Class: SimpleShowcaseAdmin::SessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SimpleShowcaseAdmin::SessionsController
- Defined in:
- app/controllers/simple_showcase_admin/sessions_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/controllers/simple_showcase_admin/sessions_controller.rb', line 9 def create user = login(params[:email], params[:password], params[:remember_me]) if user redirect_back_or_to root_path, :notice => "Logged in as #{ current_user.email }" else redirect_to login_path, :notice => 'Email or password was invalid' end end |
#destroy ⇒ Object
18 19 20 21 22 23 |
# File 'app/controllers/simple_showcase_admin/sessions_controller.rb', line 18 def destroy logout if !current_user redirect_to login_path, :notice => 'Logged out!' end end |
#new ⇒ Object
5 6 7 |
# File 'app/controllers/simple_showcase_admin/sessions_controller.rb', line 5 def new logout end |