adopt-a-hydrant/config/initializers/rails_admin.rb

6 lines
146 B
Ruby

RailsAdmin.config do |config|
config.authenticate_with do
redirect_to main_app_root_path unless signed_in? && current_user.admin?
end
end