Class: UserSessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- UserSessionsController
- Defined in:
- app/controllers/user_sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
13 14 15 16 17 |
# File 'app/controllers/user_sessions_controller.rb', line 13 def create session[:simulate_id] = params[:user_id] target = session.delete :target redirect_to target || root_url end |
#destroy ⇒ Object
19 20 21 22 |
# File 'app/controllers/user_sessions_controller.rb', line 19 def destroy session[:simulate_id] = nil redirect_to new_user_session_url, :notice => "Logout successful!" end |
#new ⇒ Object
9 10 11 |
# File 'app/controllers/user_sessions_controller.rb', line 9 def new @users = User.all end |