Class: UserSessionsController
- Inherits:
-
BumbleController
- Object
- ActionController::Base
- BumbleController
- UserSessionsController
- Defined in:
- app/controllers/user_sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/user_sessions_controller.rb', line 7 def create @user_session = UserSession.new if @user_session.save flash[:notice] = 'Logged in successfully' redirect_back_or_default root_path else render :action => 'new' end end |
#destroy ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/user_sessions_controller.rb', line 17 def destroy current_user_session.destroy flash[:notice] = 'Logged out successfully' redirect_to root_path end |
#new ⇒ Object
3 4 5 |
# File 'app/controllers/user_sessions_controller.rb', line 3 def new @user_session = UserSession.new end |