Class: Devise::SessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Devise::SessionsController
- Includes:
- Controllers::InternalHelpers
- Defined in:
- app/controllers/devise/sessions_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /resource/sign_in.
-
#destroy ⇒ Object
GET /resource/sign_out.
-
#new ⇒ Object
GET /resource/sign_in.
Methods included from Controllers::InternalHelpers
#devise_controller?, #devise_mapping, #resource, #resource_class, #resource_name
Instance Method Details
#create ⇒ Object
POST /resource/sign_in
12 13 14 15 16 |
# File 'app/controllers/devise/sessions_controller.rb', line 12 def create resource = warden.authenticate!(:scope => resource_name, :recall => "new") :notice, :signed_in sign_in_and_redirect(resource_name, resource) end |
#destroy ⇒ Object
GET /resource/sign_out
19 20 21 22 |
# File 'app/controllers/devise/sessions_controller.rb', line 19 def destroy :notice, :signed_out if signed_in?(resource_name) sign_out_and_redirect(resource_name) end |
#new ⇒ Object
GET /resource/sign_in
6 7 8 9 |
# File 'app/controllers/devise/sessions_controller.rb', line 6 def new clean_up_passwords(build_resource) render_with_scope :new end |