instance method
to_model
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
to_model()
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.
Source
# File activemodel/lib/active_model/conversion.rb, line 36
def to_model
self
end
Defined in activemodel/lib/active_model/conversion.rb line 36
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Conversion