def _association(args, default_options={})
      return if options.nil?

      options = args.first

      if options.is_a?(Hash)
        options     = {}.merge(options)
        name        = options.keys.first
        properties  = options.delete(name)

        @associations[name] = default_options.merge({ :include => properties }).merge(options)
      elsif options.is_a?(Array)
        options.each do |option|
          association option
        end
      else
        @associations[options] = args[1] || {}
      end
    end
def _association(args, default_options={})
      return if options.nil?

      options = args.first

      if options.is_a?(Hash)
        options     = {}.merge(options)
        name        = options.keys.first
        properties  = options.delete(name)

        @associations[name] = default_options.merge({ :include => properties }).merge(options)
      elsif options.is_a?(Array)
        options.each do |option|
          association option
        end
      else
        @associations[options] = args[1] || {}
      end
    end
Duplicates scope.


 Actually defines the association but without default_options.