admin_demo icon indicating copy to clipboard operation
admin_demo copied to clipboard

Example of a basic, app-specific administration interface for Rails applications.

Rails administration dashboard example

A roll-your-own alternative to admin gems for Rails applications, using RSpec request specs for some basic BDD goodness.

The source is best viewed successively by branch:

  • the dashboard branch shows how to make a basic, namespaced administration dashboard (see http://everydayrails.com/2012/07/31/rails-admin-panel-from-scratch.html)
  • the scaffold branch builds off of dashboard, taking source that was generated by a Rails scaffold and moving it into the admin namespace (see http://everydayrails.com/2012/08/07/rails-admin-panel-from-scratch-2.html)
  • the resource branch shows how to add non-scaffolded code directly to the namespace to manage an ActiveRecord resource (see http://everydayrails.com/2012/08/19/rails-admin-panel-from-scratch-3.html)
  • master contains the completed project (basically the same as resource except this README)

To get started

Written with Ruby 1.9.3.

Clone the repository, then

cd admin_demo
bundle
rake db:create
rake db:migrate
rake db:setup
rake db:test:prepare
guard (or however you want to run the specs)