When an admin logs in, it automatically redirects to the main home page (i.e. not the admin dashboard). I'm not sure why it does this or how to change it...
routes.rb
ActiveAdmin.routes(self)
devise_for :admin_user, ActiveAdmin::Devise.config
get "guidelines/topic"
get "guidelines/topichospital"
get "guidelines/topicspecialty"
get "guidelines/favourite"
get "profiles/show"
get "guidelines/show"
root :to => 'guidelines#index'
my application_controller.rb has been changed to redirect after user login (but shouldn't be admin login) - is this the problem?
include PublicActivity::StoreController
protect_from_forgery
def after_sign_in_path_for(resource)
favourites_path
end
hide_action :current_user
Thanks to Zippie I found the answer. In admin_controller.rb I added:
def after_sign_in_path_for(resource)
admin_dashboard
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With