Method: ActiveModel::Conversion#to_model

Defined in:
lib/active_model/conversion.rb

#to_modelObject

If your object is already designed to implement all of the Active Model you can use the default to_model implementation, which simply returns self.

If your model does not act like an Active Model object, then you should define :to_model yourself returning a proxy object that wraps your object with Active Model compliant methods.



32
33
34
# File 'lib/active_model/conversion.rb', line 32

def to_model
  self
end