diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-14 12:26:10 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-10-14 12:26:10 -0700 |
commit | 828134b7561bf4473580d76bd8d7ae97e9b1db92 (patch) | |
tree | d46cd75d58092a9b7986782b8be5d3044af6aa4f /activerecord/lib | |
parent | 4999281ec16db930b436febd9d60ab80c2618852 (diff) | |
parent | cd9592959f9f16b228ac3f4bc6fc92932253f8dc (diff) | |
download | rails-828134b7561bf4473580d76bd8d7ae97e9b1db92.tar.gz rails-828134b7561bf4473580d76bd8d7ae97e9b1db92.tar.bz2 rails-828134b7561bf4473580d76bd8d7ae97e9b1db92.zip |
Merge pull request #10538 from neerajdotname/3882
scope_chain should not be mutated for other reflections
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index e88c5d17cb..bce7766501 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -574,7 +574,7 @@ module ActiveRecord # Add to it the scope from this reflection (if any) scope_chain.first << scope if scope - through_scope_chain = through_reflection.scope_chain + through_scope_chain = through_reflection.scope_chain.map(&:dup) if options[:source_type] through_scope_chain.first << |