Class: Iron::SessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Iron::SessionsController
- Defined in:
- app/controllers/iron/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/iron/sessions_controller.rb', line 12 def create person = Person.authenticate_by(params.permit(:email_address, :password)) if person&.active? start_new_session_for person.user redirect_to after_authentication_url else redirect_to sign_in_url, alert: "Try another email address or password." end end |
#destroy ⇒ Object
23 24 25 26 |
# File 'app/controllers/iron/sessions_controller.rb', line 23 def destroy terminate_session redirect_to sign_in_url end |
#new ⇒ Object
9 10 |
# File 'app/controllers/iron/sessions_controller.rb', line 9 def new end |