Skip to content

Instantly share code, notes, and snippets.

@kjs3
Created March 12, 2010 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjs3/330206 to your computer and use it in GitHub Desktop.
Save kjs3/330206 to your computer and use it in GitHub Desktop.
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