1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activemodel/test/models/contact.rb
2010-02-22 08:45:41 +01:00

13 lines
251 B
Ruby

class Contact
include ActiveModel::Conversion
attr_accessor :id, :name, :age, :created_at, :awesome, :preferences
def initialize(options = {})
options.each { |name, value| send("#{name}=", value) }
end
def persisted?
id
end
end