diff options
author | John Hawthorn <john@stembolt.com> | 2017-06-20 17:35:13 -0700 |
---|---|---|
committer | John Hawthorn <john@stembolt.com> | 2017-06-21 16:53:53 -0700 |
commit | adcd3079970ea7ef715ddfb8d2a386971d73eb52 (patch) | |
tree | 0180a48c1a193a5743a043e6ffa88654bf68fde6 /activerecord/lib/active_record | |
parent | c7f669af6f1d8e9053a586c97584702971e1906c (diff) | |
download | rails-adcd3079970ea7ef715ddfb8d2a386971d73eb52.tar.gz rails-adcd3079970ea7ef715ddfb8d2a386971d73eb52.tar.bz2 rails-adcd3079970ea7ef715ddfb8d2a386971d73eb52.zip |
Move clearing of @offsets cache to reset_scope
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 88b05bbcfa..d77fcaf668 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -1088,7 +1088,6 @@ module ActiveRecord # # => [#<Pet id: 1, name: "Snoop", group: "dogs", person_id: 1>] def reload proxy_association.reload - @offsets = {} reset_scope end @@ -1111,11 +1110,11 @@ module ActiveRecord def reset proxy_association.reset proxy_association.reset_scope - @offsets = {} reset_scope end def reset_scope # :nodoc: + @offsets = {} @scope = nil self end |