A pre made admin interface, with helpers for navigation and more!
CSS Ruby HTML JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
lib
Gemfile
Gemfile.lock
nice_admin.gemspec
readme.md

readme.md

UNMAINTAINED

This project is no longer maintained

Nice Admin

A prebuilt and skinned admin centre. Because, making an admin for everything is really annoying.

Install

simply add the following to your gemfile

    gem 'nice_admin'

Then add the following to your config/environments/production.rb

    config.assets.precompile += %w( nice_admin.js nice_admin.css )

Configuring

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