aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-01-10 22:13:21 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-01-10 22:20:14 +0900
commit5a593486f5c8a73f2be200a409b0a14dff51790c (patch)
tree6766f9b10cb7dd780eb1515fd75f4d3aa784d993 /activerecord/lib/active_record/reflection.rb
parente97221a32d02cb0691760fc1783da74e4c3a371a (diff)
downloadrails-5a593486f5c8a73f2be200a409b0a14dff51790c.tar.gz
rails-5a593486f5c8a73f2be200a409b0a14dff51790c.tar.bz2
rails-5a593486f5c8a73f2be200a409b0a14dff51790c.zip
Fix `stale_state` for nested `has_many :through` associations
Need reloading when through record has replaced.
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r--activerecord/lib/active_record/reflection.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 7b53f9c15c..9e32b69786 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -504,10 +504,6 @@ module ActiveRecord
@association_scope_cache.clear
end
- def belongs_to_or_through?
- belongs_to?
- end
-
def nested?
false
end
@@ -840,10 +836,6 @@ module ActiveRecord
source_reflection.join_scopes(table, predicate_builder) + super
end
- def belongs_to_or_through?
- through_reflection.belongs_to_or_through?
- end
-
def has_scope?
scope || options[:source_type] ||
source_reflection.has_scope? ||