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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 82f648b873..5199886f79 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -279,6 +279,8 @@ module ActiveRecord
nil
end
+ alias :source_macro :macro
+
def has_inverse?
@options[:inverse_of]
end
@@ -474,6 +476,10 @@ module ActiveRecord
end
end
+ def source_macro
+ source_reflection.source_macro
+ end
+
# A through association is nested iff there would be more than one join table
def nested?
through_reflection_chain.length > 2 ||