ActiveModel::Model
module ActiveModel::Model
Active Model Basic Model
Includes the required interface for an object to interact with ActionPack
, using different ActiveModel
modules. It includes model name introspections, conversions, translations and validations. Besides that, it allows you to initialize the object with a hash of attributes, pretty much like ActiveRecord
does.
A minimal implementation could be:
class Person include ActiveModel::Model attr_accessor :name, :a