aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_proxy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/associations/association_proxy.rb')
-rw-r--r--activerecord/lib/active_record/associations/association_proxy.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb
index 75f9184aa2..c62c042ab2 100644
--- a/activerecord/lib/active_record/associations/association_proxy.rb
+++ b/activerecord/lib/active_record/associations/association_proxy.rb
@@ -73,6 +73,17 @@ module ActiveRecord
def extract_options_from_args!(args)
@owner.send(:extract_options_from_args!, args)
end
+
+ def merge_options_from_reflection!(options)
+ options.reverse_merge!(
+ :group => @reflection.options[:group],
+ :limit => @reflection.options[:limit],
+ :offset => @reflection.options[:offset],
+ :joins => @reflection.options[:joins],
+ :include => @reflection.options[:include],
+ :select => @reflection.options[:select]
+ )
+ end
private
def method_missing(method, *args, &block)