Flowdock
method

new

Importance_1
v5.0.0.1 - Show latest stable - 0 notes - Class: Model
new(attributes={}) public

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"
Show source
Register or log in to add new notes.