Class: CurrentUser::SessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- CurrentUser::SessionsController
- Defined in:
- app/controllers/current_user/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 |
# File 'app/controllers/current_user/sessions_controller.rb', line 12 def create user = ::User.find params[:user_id] sign_in user redirect_to after_sign_in_url erase_stored_location end |
#destroy ⇒ Object
19 20 21 22 |
# File 'app/controllers/current_user/sessions_controller.rb', line 19 def destroy new render :new end |
#new ⇒ Object
7 8 9 10 |
# File 'app/controllers/current_user/sessions_controller.rb', line 7 def new sign_out @users = users end |