Class: Spree::Admin::UserSessionsController
- Inherits:
-
Object
- Object
- Spree::Admin::UserSessionsController
- Defined in:
- app/controllers/spree/admin/user_sessions_controller.rb
Instance Method Summary collapse
-
#create {|resource| ... } ⇒ Object
We need to overwrite this action because ‘return_to` url may be in a different domain So we need to pass `allow_other_host` option to `redirect_to` method.
Instance Method Details
#create {|resource| ... } ⇒ Object
We need to overwrite this action because ‘return_to` url may be in a different domain So we need to pass `allow_other_host` option to `redirect_to` method
8 9 10 11 12 13 14 |
# File 'app/controllers/spree/admin/user_sessions_controller.rb', line 8 def create self.resource = warden.authenticate!() (:notice, :signed_in) sign_in(resource_name, resource) yield resource if block_given? redirect_to after_sign_in_path_for(resource), allow_other_host: true end |