module ActionView::ModelNaming

def convert_to_model(object)

Converts the given object to an Active Model compliant one.
:nodoc:
def convert_to_model(object)
  object.respond_to?(:to_model) ? object.to_model : object
end