Getting Started

Administrate is released as a Ruby gem, and can be installed on Rails applications version 4.2 or greater.

Add the following to your Gemfile:

# Gemfile
gem "administrate"

Re-bundle, then run the installer:

$ rails generate administrate:install

The installer adds some new routes to your config/application.rb, and creates a controller at app/controllers/admin/application_controller.rb

In addition, the generator creates a Dashboard and a Controller for each of your ActiveRecord resources:

The Admin::ApplicationController can be customized to add authentication logic, authorization, pagination, or other controller-level concerns.

The routes can be customized to show or hide different models on the dashboard.

Each FooDashboard specifies which attributes should be displayed on the admin dashboard for the Foo resource.

Each Admin::FooController can be overwritten to specify custom behavior.

Once you have Administrate installed, visit http://localhost:3000/admin to see your new dashboard in action.