Class: Mori::SessionsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Mori::SessionsController
- Defined in:
- app/controllers/mori/sessions_controller.rb
Overview
Mori::SessionsController is responsible for creating and destroying sessions
Instance Method Summary collapse
Methods inherited from BaseController
Instance Method Details
#create ⇒ Object
13 14 15 16 |
# File 'app/controllers/mori/sessions_controller.rb', line 13 def create warden.authenticate! redirect_to @config.dashboard_path, :notice => 'You have logged in' end |
#destroy ⇒ Object
18 19 20 21 |
# File 'app/controllers/mori/sessions_controller.rb', line 18 def destroy warden.logout redirect_to @config.after_logout_path end |
#new ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/controllers/mori/sessions_controller.rb', line 3 def new if current_user redirect_to @config.dashboard_path else @user = @config.user_model.new flash.now.alert = warden. render :template => 'sessions/new' end end |