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 ofdashboard
, taking source that was generated by a Rails scaffold and moving it into theadmin
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 asresource
except thisREADME
)
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)