Class: Munificent::Admin::UserSessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Munificent::Admin::UserSessionsController
- Defined in:
- app/controllers/munificent/admin/user_sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/munificent/admin/user_sessions_controller.rb', line 13 def create @user_session = UserSession.new(user_session_params.to_h) if @user_session.save redirect_to root_path else flash[:alert] = @user_session.errors..join(", ") redirect_to new_user_session_path end end |
#destroy ⇒ Object
24 25 26 27 28 |
# File 'app/controllers/munificent/admin/user_sessions_controller.rb', line 24 def destroy current_user_session.destroy redirect_to new_user_session_path end |
#new ⇒ Object
9 10 11 |
# File 'app/controllers/munificent/admin/user_sessions_controller.rb', line 9 def new @user_session = UserSession.new end |