diff options
author | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2014-08-17 23:01:13 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2014-08-17 23:01:13 -0300 |
commit | d2d809868c3eeb4d4a964382fc3df15cd5da70e4 (patch) | |
tree | 4f790872d6cb202b235ed21fc3c5ade6c4511399 /actionpack/lib/action_controller | |
parent | 76883f92374c6395f13c16628e1d87d40b6d2399 (diff) | |
parent | 6b0e834a194d112585f41deba0a40780d68e38c6 (diff) | |
download | rails-d2d809868c3eeb4d4a964382fc3df15cd5da70e4.tar.gz rails-d2d809868c3eeb4d4a964382fc3df15cd5da70e4.tar.bz2 rails-d2d809868c3eeb4d4a964382fc3df15cd5da70e4.zip |
Merge pull request #15889 from carnesmedia/model-name
Use #model_name on instances instead of classes
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/model_naming.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/model_naming.rb b/actionpack/lib/action_controller/model_naming.rb index 785221dc3d..2b33f67263 100644 --- a/actionpack/lib/action_controller/model_naming.rb +++ b/actionpack/lib/action_controller/model_naming.rb @@ -6,7 +6,7 @@ module ActionController end def model_name_from_record_or_class(record_or_class) - (record_or_class.is_a?(Class) ? record_or_class : convert_to_model(record_or_class).class).model_name + convert_to_model(record_or_class).model_name end end end |