diff options
author | Andrew McCloud <andrew@amccloud.com> | 2014-06-15 16:15:32 -0700 |
---|---|---|
committer | Andrew McCloud <andrew@amccloud.com> | 2014-06-15 16:16:55 -0700 |
commit | 0bc6c2578635d5acedcfef90c8cd7a45fa5604c7 (patch) | |
tree | 365acd7f8d2fad577bc4310c40586652ef2806a4 /activerecord/lib/active_record | |
parent | 952d0f8bdfa3f919794bf36049bafd2d95e3c97b (diff) | |
download | rails-0bc6c2578635d5acedcfef90c8cd7a45fa5604c7.tar.gz rails-0bc6c2578635d5acedcfef90c8cd7a45fa5604c7.tar.bz2 rails-0bc6c2578635d5acedcfef90c8cd7a45fa5604c7.zip |
Fixed automatic inverse_of for models nested in module
Diffstat (limited to 'activerecord/lib/active_record')
-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 51c96373ee..f23ed263fb 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -487,7 +487,7 @@ Joining, Preloading and eager loading of these associations is deprecated and wi # returns either nil or the inverse association name that it finds. def automatic_inverse_of if can_find_inverse_of_automatically?(self) - inverse_name = ActiveSupport::Inflector.underscore(options[:as] || active_record.name).to_sym + inverse_name = ActiveSupport::Inflector.underscore(options[:as] || active_record.name.demodulize).to_sym begin reflection = klass._reflect_on_association(inverse_name) |