Having a buckload of code to authorize users on your application is something you may like or not.
Speaking for myself I hate it. But I still love rails_admin
, here's how you install it without devise. Thanks to phoet for providing the hints in the gist I have forked from.
do NOT add devise
gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git"
gem "fastercsv", :platform => :ruby_18
bundle install
rails g rails_admin:install
Remove everything you do not need e.g. migrations or config/locales/devise* Cleanup the Gemfile and routes.rb etc
rake db:migrate
In config/initializers/rails_admin.rb
:.
class FakeUser
def self.username
'admin'
end
def self.email
'[email protected]'
end
end
RailsAdmin.config do |config|
config.current_user_method { FakeUser }
config.main_app_name { ['Recommended Games', 'Admin'] }
config.authenticate_with{}
end
This doesn't seem to work. When the HTTP Basic authentication box appears, pressing cancel without providing any credentials grants access to rails_admin. I fixed it by doing the following:
In config/initializers/rails_admin.rb: