Class: Users::SessionsController

Inherits:
Devise::SessionsController
  • Object
show all
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

SocialFramework::VERSION

Instance Method Summary collapse

Methods included from SocialFramework

setup

Instance Method Details

#configure_sign_in_paramsObject

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 
  devise_parameter_sanitizer.for(:sign_in) << [:login, :username]
end

#destroyObject

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