# File lib/active_record/deprecated_finders/association_builder.rb, line 9 def initialize(options) options[:includes] = options.delete(:include) if options[:include] options[:where] = options.delete(:conditions) if options[:conditions] @options = options end
# File lib/active_record/deprecated_finders/association_builder.rb, line 29 def arity 1 end
# File lib/active_record/deprecated_finders/association_builder.rb, line 16 def to_proc options = self.options proc do |owner| if options[:where].respond_to?(:to_proc) context = owner || self where(context.instance_eval(&options[:where])) .merge!(options.except(:where)) else merge(options) end end end