Class: Authifer::User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Authifer::User
- Includes:
- Songkick::OAuth2::Model::ClientOwner, Songkick::OAuth2::Model::ResourceOwner
- Defined in:
- lib/authifer/user.rb
Instance Method Summary collapse
Instance Method Details
#password ⇒ Object
18 19 20 |
# File 'lib/authifer/user.rb', line 18 def password @password ||= BCrypt::Password.new(password_digest) if password_digest end |
#password=(password) ⇒ Object
13 14 15 16 |
# File 'lib/authifer/user.rb', line 13 def password=password @password = BCrypt::Password.create(password) self.password_digest = @password end |
#password_is_set ⇒ Object
22 23 24 25 26 |
# File 'lib/authifer/user.rb', line 22 def password_is_set if !password || password == "" errors.add(:password, "can't be blank") end end |