contactorama/app/models/user.rb
2013-11-02 15:07:14 +01:00

17 lines
739 B
Ruby

class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
# removed: :registerable
devise :database_authenticatable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
# Note: This is not needed anymore as devise now complies with the strong parameters rules of Rails 4 (which are handled in the ApplicationController).
# attr_accessible :email, :password, :password_confirmation, :remember_me
# This is needed by CanCan
def admin?
email === "roland@gasbottle-county.eu" ? ret = true : ret = false
ret
end
end