resources_controller rails plugin: rc makes RESTful controllers fun
Switch branches/tags
Nothing to show
Pull request Compare This branch is 43 commits behind ianwhite:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



is a plugin to facilitate inheritance and DRYness in your resources controllers. It introduces some abstraction to help you override the default RESTful funtionality in a clean and simple manner.

See History.txt for recent changes.


Github for code:

API docs:

Google group for questions:

Lighthouse for bugs:

Blog articles:

RailsConfEurope presentation files:

works with rails 2.x

resources_controller works with rails 2.x, and is currently tested against 2.0, 2.1, 2.2, and 2.3 stable branches

Specs and Coverage

  • The SPECDOC lists the specifications

  • Coverage is 100% (C0), and the spec suite is quite comprehensive

  • Rspec's generated rspec_scaffold controller specs are tested against a simple rc controller (see rake spec:generate)

RSpec is used for testing, so the tests are in spec/ rather than test/ Do rake –tasks for more details.

Continuous Integration

garlic (at is used for CI. To run the CI suite have a look at garlic.rb

How to contribute

If you have found a bug, or have a new feature, then spec'd code is great. To make sure you haven't broken rc, you want to run the ci suite. This is pretty easy, you just need to install garlic, and run it in a fresh checkout of rc. The first time it runs it will be a little slow, as it needs to check out various git repos, but subsequent runs will be fast. The following is how I work - you may want to only do a subset of this stuff

sudo gem install garlic

# add the following line to your ~/.profile
  source `garlic --path`/sh/

# reload your profile
. ~/.profile

# grab resources_controller and run the suite for the first time
git clone git://
cd resources_controller
garlic all

# jump into 2-3 garlic work repo to make some changes
gcdp 2-3

# commit some stuff, run the specs with 'rake' etc

# then push up to the local master repo

# go back to the local master, run garlic again, to see if the 2-3 changes affected anything else


The following people have made contributions to resources_controller. Please let me know if I've missed you out.

  • Chris Hapgood

  • Jason Lee

  • Richard Hooker

  • Matt Mower

  • Inviz

  • Dan Kubb

  • Rein Henrichs

  • Tom Stuart

  • Joel Chippindale

  • Tim Pope

  • Tom ten Thij

  • Sergei Serdyuk


Copyright © 2007-2009 Ian White, MIT License