diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-06-13 10:23:15 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-06-13 10:23:15 -0700 |
commit | 5d46c570de8c61a934fded247c787e1542504055 (patch) | |
tree | e9c96ed6c8379d7c7b158395a8aa11640d7abbbf /activerecord | |
parent | 16b70fddd4dc7e7fb7be108add88bae6e3c2509b (diff) | |
download | rails-5d46c570de8c61a934fded247c787e1542504055.tar.gz rails-5d46c570de8c61a934fded247c787e1542504055.tar.bz2 rails-5d46c570de8c61a934fded247c787e1542504055.zip |
active_record should always be set. Do or do not, there is no try
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 98c469f2f3..6eecc8252b 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -446,7 +446,7 @@ module ActiveRecord # from calling +klass+, +reflection+ will already be set to false. def valid_inverse_reflection?(reflection) reflection && - klass.name == reflection.active_record.try(:name) && + klass.name == reflection.active_record.name && klass.primary_key == reflection.active_record_primary_key && can_find_inverse_of_automatically?(reflection) end |