Skip to content

Instantly share code, notes, and snippets.

@zr2d2
Created July 12, 2011 03:56
Show Gist options
  • Select an option

  • Save zr2d2/1077365 to your computer and use it in GitHub Desktop.

Select an option

Save zr2d2/1077365 to your computer and use it in GitHub Desktop.
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
devise :cas_authenticatable, :trackable
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :remember_me, :username
has_and_belongs_to_many :layers
ROLES = %w[admin moderator author banned]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment