Sha256: 8677ef357e313a66b2eef1209b872e1c016f715f3902aabaa7b7027d9de01ec3
Contents?: true
Size: 833 Bytes
Versions: 4
Compression:
Stored size: 833 Bytes
Contents
class User < ActiveRecord::Base devise :database_authenticatable, :confirmable, :lockable, :recoverable, :rememberable, :trackable, :validatable, :registerable, :encryptable, encryptor: :sha512 attr_accessible :password, :password_confirmation, :email, :remember_me, :login, :first_name, :last_name, :patronymic, :phone, :skype, :web_site, :address, :birthday, :time_zone, :locale, :bg_color, :gender attr_accessible :user_role_id, as: :admin include AbAdmin::Concerns::AdminAddition include AbAdmin::Models::User fileuploads :avatar def init set_default_role self.locale ||= 'ru' self.time_zone ||= 'Kiev' end def password_required? return true if password.present? return false if persisted? && password.blank? super end end
Version data entries
4 entries across 4 versions & 1 rubygems