Class: Morpho::SessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Morpho::SessionsController
- Defined in:
- app/controllers/morpho/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/controllers/morpho/sessions_controller.rb', line 5 def create if login(session_params[:email], session_params[:password], session_params[:remember_me]) redirect_to root_path, success: I18n.t('morpho.messages.sessions.create.success') and return else flash.now[:error] = I18n.t('morpho.messages.sessions.create.failure') render :new end end |
#destroy ⇒ Object
14 15 16 |
# File 'app/controllers/morpho/sessions_controller.rb', line 14 def destroy redirect_to sign_in_path, success: I18n.t('morpho.messages.sessions.destroy.success') and return if logout end |