Skip to content

Instantly share code, notes, and snippets.

@remear
Created December 19, 2010 05:43
Show Gist options
  • Save remear/747130 to your computer and use it in GitHub Desktop.
Save remear/747130 to your computer and use it in GitHub Desktop.
class TicketType < Struct.new(:name)
extend ActiveModel::Naming
include ActiveModel::Conversion
extend ActiveModel::Translation
def initialize(*args)
super
end
def persisted=(boolean)
@persisted = boolean
end
def persisted?
@persisted
end
attr_accessor :name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment