do NOT add devise
gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git"
bundle install
rails g rails_admin:install
Remove everything you do not need: migrations + added devise in Gemfile
In config/initializers/rails_admin.rb
:.
RailsAdmin.config do |config|
config.authorize_with do
authenticate_or_request_with_http_basic('Site Message') do |username, password|
username == 'foo' && password == 'bar'
end
end
config.main_app_name { ['My App', 'Admin'] }
end
Thanks to phoet for providing the hints in the gist I have forked from.
This works well locally but doesn't seem to work with Heroku.
It doesn't break, but the /admin page bypasses the authorization window completely when accessed after being deployed to Heroku.
I may be deploying wrong.. Any tips?