diff options
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index b7cd466e13..ee63fcfce2 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -395,6 +395,10 @@ module ActiveRecord chain end end + + def nested? + through_reflection_chain.length > 2 + end # Gets an array of possible <tt>:through</tt> source reflection names: # |