This project is no longer maintained
A prebuilt and skinned admin centre. Because, making an admin for everything is really annoying.
simply add the following to your gemfile
Then add the following to your config/environments/production.rb
config.assets.precompile += %w( nice_admin.js nice_admin.css )
Create an initializer called nice_admin.rb in config/initialisers, inside you can set the following..
NiceAdmin.site_title = 'MySiteName - Admin' NiceAdmin.site_name = 'MySiteName'
Create an admin controller in your application and have it inherit from nice_admin like so
Notice this is where you also define the navigation items and include any authenticate you may need.
Nice admin DOES NOT DO AUTHENTICATION, this before filter is from devise
class AdminController < NiceAdminController # devise before filter before_filter :authenticate_admin! # defining nav items nice_admin_nav do |nav| nav.item 'Home', '/admin' nav.item 'Admins', '/admin/admins' end end
Now, when making admin controller they should inherit from your AdminController nice_admin supports pagination via kaminari automatically
class ArticlesController < AdminController def index @admins = Admin.order('created_at DESC').page(params[:page]).per(20) end end