Sha256: eeb283d0a181eeff5ff7ca34edf9d4e7f1440ce87e54212689883813221ad013

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

class User
  include MongoMapper::Document
  # Include default devise modules. Others available are:
  # :token_authenticatable, :confirmable, :lockable and :timeoutable
  devise :database_authenticatable, 
         :recoverable, :rememberable, :trackable, :validatable

  include Canable::Cans
  key :name, String
  key :groups, Array

  timestamps!

  def full_name
    name || email
  end

  def admin?
    groups.include?('admin')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
noodall-devise-0.0.1 app/models/user.rb