Im having dificulty in setting the root page in may Rails app to the default login page of the Active Admin gems, at localhost:3000/admin/login. Here's my routes.rb:
TestActiveadmin::Application.routes.draw do ActiveAdmin.routes(self) devise_for :admin_users, ActiveAdmin::Devise.config match 'login' => 'sessions#new', :as => :login match 'signup' => 'users#new', :as => :signup match 'logout' => 'sessions#destroy', :as => :logout resources :sessions resources :users end
What should I do?
Tell rails you want the default root to go to the admin namespace, dashboard controller, index action:
root to: "admin/dashboard#index"
You can edit the Active Admin config file: config/initializers/active_admin.rb
config.root_to = 'admin/dashboard#index'
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