aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r--activerecord/lib/active_record/reflection.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 9e32b69786..7b53f9c15c 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -504,6 +504,10 @@ module ActiveRecord
@association_scope_cache.clear
end
+ def belongs_to_or_through?
+ belongs_to?
+ end
+
def nested?
false
end
@@ -836,6 +840,10 @@ 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? ||