diff options
author | Willian Gustavo Veiga <beberveiga@gmail.com> | 2018-10-11 07:44:27 -0300 |
---|---|---|
committer | Willian Gustavo Veiga <beberveiga@gmail.com> | 2018-10-11 07:44:27 -0300 |
commit | 99bd626885b72acd44861727918ee107a649e2b4 (patch) | |
tree | 6d59fcdb226a65d9eb63f8bad2b2df7b09b92a60 /activemodel | |
parent | 4b60e34f58c0dabe18a793038fc7775d044016f6 (diff) | |
parent | 6a278c6e9a05b0d901e482458cfc2e3df587d522 (diff) | |
download | rails-99bd626885b72acd44861727918ee107a649e2b4.tar.gz rails-99bd626885b72acd44861727918ee107a649e2b4.tar.bz2 rails-99bd626885b72acd44861727918ee107a649e2b4.zip |
Merge branch 'master' into feature/reselect-method
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/naming.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index 5f3d674c4e..bf23fa3c05 100644 --- a/activemodel/lib/active_model/naming.rb +++ b/activemodel/lib/active_model/naming.rb @@ -252,7 +252,7 @@ module ActiveModel # Person.model_name.plural # => "people" def model_name @_model_name ||= begin - namespace = parents.detect do |n| + namespace = module_parents.detect do |n| n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming? end ActiveModel::Name.new(self, namespace) |