Sha256: ffe4fde16207653ff067f602b19a28c24fe184590e7e72297b43d6a59caa260e
Contents?: true
Size: 719 Bytes
Versions: 7
Compression:
Stored size: 719 Bytes
Contents
class DailyUser < 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, :class_name => "DailyTable", :foreign_key => "user_id" has_many :reports, :class_name => "DailyReport", :foreign_key => "user_id" def role_symbols return [] if new_record? out = [:user] out << :admin if admin? out end end
Version data entries
7 entries across 7 versions & 1 rubygems