Sha256: cf525f730fcc603ec4ff9268f84990e4a995fcca588ece0843308da92308a586

Contents?: true

Size: 601 Bytes

Versions: 2

Compression:

Stored size: 601 Bytes

Contents

class User < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable

  # Setup accessible (or protected) attributes for your model
  attr_accessible :email, :password, :password_confirmation, :remember_me
  
  has_many :tables
  has_many :reports
  
  def role_symbols
    return [] if new_record?
    
    out = [:user]
    out << :admin if admin?
    out
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
daily-0.0.3 app/models/user.rb
daily-0.0.2 app/models/user.rb