Skip to content

Instantly share code, notes, and snippets.

@crystalneth
Created April 8, 2011 23:07
Show Gist options
  • Save crystalneth/910911 to your computer and use it in GitHub Desktop.
Save crystalneth/910911 to your computer and use it in GitHub Desktop.
class Message
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Naming
include ActiveModel::Serialization
include ActiveModel::AttributeMethods
# attr_accessor :body, :subject, :recipients, :documents, :sender
define_attribute_methods [:body, :subject, :recipients, :documents, :sender]
attr_accessor :attributes
def initialize(attributes)
@attributes = attributes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment