Class: DeviseCodeAuthenticatable::SessionsController
- Inherits:
-
Devise::SessionsController
- Object
- Devise::SessionsController
- DeviseCodeAuthenticatable::SessionsController
- Defined in:
- app/controllers/devise_code_authenticatable/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create {|resource| ... } ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/devise_code_authenticatable/sessions_controller.rb', line 3 def create self.resource = resource_class.send_code_login_instructions(resource_params) yield resource if block_given? flash.clear if successfully_sent?(resource) respond_with resource, location: after_sending_login_code_path_for(resource_name, resource) else (:alert, "send_mail_failed") respond_with resource, location: after_sign_in_path_for(resource) end end |