new(params={})
Class Public methods
Initializes a new model with the given params
.
class Person include ActiveModel::Model attr_accessor :name, :age end person = Person.new(name: 'bob', age: '18') person.name # => "bob" person.age # => 18
Please login to continue.