Class: Tramway::Auth::SessionForm
- Inherits:
-
Core::ApplicationForm
- Object
- Core::ApplicationForm
- Tramway::Auth::SessionForm
- Defined in:
- app/forms/tramway/auth/session_form.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'app/forms/tramway/auth/session_form.rb', line 6 def password @password end |
Instance Method Details
#validate(params) ⇒ Object
8 9 10 11 12 |
# File 'app/forms/tramway/auth/session_form.rb', line 8 def validate(params) (!model.new_record? && model.authenticate(params[:password])).tap do |result| add_wrong_email_or_password_error unless result end end |