def expand_includes(includes, options = {})

      return includes if includes.is_a?(Hash) # already expanded

      includes = case includes
                 when nil    then []
                 when Array  then includes
                 when Symbol then [ includes ]
                 when String then includes.split(',')
                 else
                   raise ArgumentError, "unexpected includes #{includes.class}"
                 end

      includes.each_with_object({}) do |i, hash|
        i.to_s.downcase.strip.split('.').reduce(hash) do |h, part|
          h[part.to_sym] ||= {}
        end
      end

    end
def expand_includes(includes, options = {})

      return includes if includes.is_a?(Hash) # already expanded

      includes = case includes
                 when nil    then []
                 when Array  then includes
                 when Symbol then [ includes ]
                 when String then includes.split(',')
                 else
                   raise ArgumentError, "unexpected includes #{includes.class}"
                 end

      includes.each_with_object({}) do |i, hash|
        i.to_s.downcase.strip.split('.').reduce(hash) do |h, part|
          h[part.to_sym] ||= {}
        end
      end

    end
----------------------------------------------------------------------------------------------