rbclass Person
include ActiveModel::Model
attr_accessor :id, :name, :omg
def initialize(attributes={})
super
@omg ||= true
end
end
person = Person.new(id: 1, name: 'bob')
person.omg # => true
rb def first_or_initialize(attributes = nil, &block) # :nodoc:
first || new(attributes, &block)
end