Class: DouguiUsers::UserSessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- DouguiUsers::UserSessionsController
- Defined in:
- app/controllers/dougui_users/user_sessions_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /user_sessions POST /user_sessions.xml.
-
#destroy ⇒ Object
DELETE /user_sessions/1 DELETE /user_sessions/1.xml.
-
#new ⇒ Object
GET /user_sessions/new GET /user_sessions/new.xml.
Methods inherited from ApplicationController
#load_user_using_perishable_token
Instance Method Details
#create ⇒ Object
POST /user_sessions POST /user_sessions.xml
14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/dougui_users/user_sessions_controller.rb', line 14 def create @user_session = UserSession.new(params[:user_session]) @user_session.remember_me = true if @user_session.save redirect_to(root_path) else render :action => "new" end end |
#destroy ⇒ Object
DELETE /user_sessions/1 DELETE /user_sessions/1.xml
26 27 28 29 30 31 32 |
# File 'app/controllers/dougui_users/user_sessions_controller.rb', line 26 def destroy @user_session = UserSession.find if @user_session @user_session.destroy end redirect_to root_path end |
#new ⇒ Object
GET /user_sessions/new GET /user_sessions/new.xml
8 9 10 |
# File 'app/controllers/dougui_users/user_sessions_controller.rb', line 8 def new @user_session = UserSession.new end |