Module: AnyLogin::Provider::Devise::Controller
- Defined in:
- lib/any_login/providers/devise.rb
Constant Summary collapse
- DEFAULT_SIGN_IN =
proc do |loginable| reset_session sign_in Controller.mapping_key, loginable end
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.any_login_current_user_method ⇒ Object
12 13 14 |
# File 'lib/any_login/providers/devise.rb', line 12 def self.any_login_current_user_method @@any_login_current_user_method ||= "current_#{mapping_key}".to_sym end |
Instance Method Details
#any_login_sign_in ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/any_login/providers/devise.rb', line 20 def any_login_sign_in @loginable = AnyLogin.klass.find(user_id) sign_in = AnyLogin.sign_in || DEFAULT_SIGN_IN instance_exec(@loginable, &sign_in) redirect_to main_app.send(AnyLogin.redirect_path_after_login) end |