diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-26 14:50:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-26 14:50:34 -0400 |
commit | 36d3f59a31c258570fea71902237ecb872ba9408 (patch) | |
tree | 88278cff7a79497713f017aa3d940677960441bf /activerecord/lib | |
parent | 229d8b2a7e30761054ca2eb5b359f4db4fadb7e2 (diff) | |
parent | adcd3079970ea7ef715ddfb8d2a386971d73eb52 (diff) | |
download | rails-36d3f59a31c258570fea71902237ecb872ba9408.tar.gz rails-36d3f59a31c258570fea71902237ecb872ba9408.tar.bz2 rails-36d3f59a31c258570fea71902237ecb872ba9408.zip |
Merge pull request #29511 from jhawthorn/clear_offsets_cache_on_collection_proxy
Rails 5.1.2.rc1 regression - Clear offset cache on CollectionProxy reset/reload
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 8cdb508c43..d77fcaf668 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -1114,6 +1114,7 @@ module ActiveRecord end def reset_scope # :nodoc: + @offsets = {} @scope = nil self end |