Class: FastExt::UserAuthenticator
- Inherits:
-
Object
- Object
- FastExt::UserAuthenticator
- Defined in:
- app/models/fast_ext/user_authenticator.rb
Instance Method Summary collapse
- #authenticate(unencrypted_password) ⇒ Object
-
#initialize(user) ⇒ UserAuthenticator
constructor
A new instance of UserAuthenticator.
Constructor Details
#initialize(user) ⇒ UserAuthenticator
Returns a new instance of UserAuthenticator.
4 5 6 |
# File 'app/models/fast_ext/user_authenticator.rb', line 4 def initialize(user) @user = user end |
Instance Method Details
#authenticate(unencrypted_password) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/models/fast_ext/user_authenticator.rb', line 8 def authenticate(unencrypted_password) return false unless @user if @user.password == unencrypted_password @user else false end end |