Module: ActiveAdmin::Devise::Controller
- Extended by:
- ActiveSupport::Concern
- Included in:
- ConfirmationsController, PasswordsController, RegistrationsController, SessionsController, UnlocksController
- Defined in:
- lib/active_admin/devise.rb
Instance Method Summary collapse
-
#root_path ⇒ Object
Redirect to the default namespace on logout.
Instance Method Details
#root_path ⇒ Object
Redirect to the default namespace on logout
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/active_admin/devise.rb', line 36 def root_path namespace = ActiveAdmin.application.default_namespace.presence root_path_method = [namespace, :root_path].compact.join("_") path = if Helpers::Routes.respond_to? root_path_method Helpers::Routes.send root_path_method else # Guess a root_path when url_helpers not helpful "/#{namespace}" end # NOTE: `relative_url_root` is deprecated by Rails. # Remove prefix here if it is removed completely. prefix = Rails.configuration.action_controller[:relative_url_root] || "" prefix + path end |