Example of a basic, app-specific administration interface for Rails applications.
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:
dashboard
branch shows how to make a basic, namespaced administration dashboard (see http://everydayrails.com/2012/07/31/rails-admin-panel-from-scratch.html)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)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
)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)