Skip to content

Instantly share code, notes, and snippets.

@adamdilek
Created November 2, 2012 13:24
Show Gist options
  • Select an option

  • Save adamdilek/4001358 to your computer and use it in GitHub Desktop.

Select an option

Save adamdilek/4001358 to your computer and use it in GitHub Desktop.
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :token_authenticatable
before_save :ensure_authentication_token
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me
# attr_accessible :title, :body
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment