Class: Users::SessionsController
- Inherits:
-
Devise::SessionsController
- Object
- Devise::SessionsController
- Users::SessionsController
- Includes:
- SocialFramework
- Defined in:
- app/controllers/users/sessions_controller.rb
Overview
Controller responsible to sign_in an sign_out users
Constant Summary
Constants included from SocialFramework
Instance Method Summary collapse
-
#configure_sign_in_params ⇒ Object
New params added: login and username.
-
#destroy ⇒ Object
DELETE /resource/sign_out.
Methods included from SocialFramework
Instance Method Details
#configure_sign_in_params ⇒ Object
New params added: login and username. If you have extra params to permit, append them to the sanitizer.
25 26 27 |
# File 'app/controllers/users/sessions_controller.rb', line 25 def configure_sign_in_params devise_parameter_sanitizer.for(:sign_in) << [:login, :username] end |
#destroy ⇒ Object
DELETE /resource/sign_out
17 18 19 20 |
# File 'app/controllers/users/sessions_controller.rb', line 17 def destroy current_user.graph.destroy(current_user.id) if current_user super end |