ActionController::ModelNaming
module ActionController::ModelNaming
Public Instance Methods
Converts the given object to an ActiveModel compliant one.
# File actionpack/lib/action_controller/model_naming.rb, line 4 def convert_to_model(object) object.respond_to?(:to_model) ? object.to_model : object end