aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/model_naming.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/model_naming.rb')
-rw-r--r--actionview/lib/action_view/model_naming.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/model_naming.rb b/actionview/lib/action_view/model_naming.rb
index e09ebd60df..b6ed13424e 100644
--- a/actionview/lib/action_view/model_naming.rb
+++ b/actionview/lib/action_view/model_naming.rb
@@ -1,12 +1,12 @@
module ActionView
- module ModelNaming
+ module ModelNaming #:nodoc:
# Converts the given object to an ActiveModel compliant one.
def convert_to_model(object)
object.respond_to?(:to_model) ? object.to_model : object
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