convert_to_model(object)
Converts the given object to an ActiveModel compliant one.
# File actionpack/lib/action_view/helpers/form_helper.rb, line 109 def convert_to_model(object) object.respond_to?(:to_model) ? object.to_model : object end