convert_to_model(object)
Converts the given object to an ActiveModel compliant one.
# File actionview/lib/action_view/model_naming.rb, line 6 def convert_to_model(object) object.respond_to?(:to_model) ? object.to_model : object end