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

6 lines
230 B
Ruby
Raw Normal View History

RailsAdmin.config do |config|
config.authenticate_with do
2014-04-01 08:15:29 +00:00
redirect_to(main_app.root_path, flash: {warning: 'You must be signed-in as an administrator to access that page'}) unless signed_in? && current_user.admin?
end
end