Class: Admin::Kitsune::SessionsController
- Inherits:
-
KitsuneController
- Object
- KitsuneController
- Admin::Kitsune::SessionsController
- Defined in:
- app/controllers/admin/kitsune/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/admin/kitsune/sessions_controller.rb', line 8 def create @user = KitsuneUser.authenticate(params[:session][:email], params[:session][:password]) if @user.nil? flash[:notice] = "Could not log you in" render 'new' else sign_in(@user) redirect_back_or(url_for(:controller => 'admin/kitsune/models')) end end |
#destroy ⇒ Object
19 20 21 22 |
# File 'app/controllers/admin/kitsune/sessions_controller.rb', line 19 def destroy sign_out redirect_to(url_for(:controller => 'admin/kitsune/models')) end |
#new ⇒ Object
4 5 6 |
# File 'app/controllers/admin/kitsune/sessions_controller.rb', line 4 def new end |