Module: Teamable::Controllers::UrlHelpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/teamable/controllers/url_helpers.rb
Instance Method Summary collapse
-
#after_account_switched_path(account = nil) ⇒ Object
Method references in Teamable::AccountsController#switch to redirect a user after they’ve switched to another account.
Instance Method Details
#after_account_switched_path(account = nil) ⇒ Object
Method references in Teamable::AccountsController#switch to redirect a user after they’ve switched to another account. You can override it in your ApplicationController to provide a custom url.
13 14 15 16 17 |
# File 'lib/teamable/controllers/url_helpers.rb', line 13 def after_account_switched_path(account = nil) return root_path(account_id: nil) if defined?(current_user) && current_user&.personal_account == account root_path(account_id: account) end |