Skip to content

Instantly share code, notes, and snippets.

@kjs3 kjs3/gist:330206
Created Mar 12, 2010

Embed
What would you like to do?
class User
include MongoMapper::Document
# Include default devise modules. Others available are:
# devise :authenticatable, :confirmable, :lockable, :recoverable, :rememberable, :registerable, :trackable, :timeoutable, :validatable
devise :registerable, :authenticatable
# Setup accessible (or protected) attributes for your model
# attr_accessible :email, :password, :password_confirmation
key :key, String
timestamps!
# Validations :::::::::::::::::::::::::::::::::::::::::::::::::::::
# validates_presence_of :attribute
# Assocations :::::::::::::::::::::::::::::::::::::::::::::::::::::
# belongs_to :model
# many :model
# one :model
# Callbacks :::::::::::::::::::::::::::::::::::::::::::::::::::::::
# before_craete :your_model_method
# after_create :your_model_method
# before_upate :your_model_method
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.