On 1 Oct 2008, at 14:11, David Chelimsky wrote:

It's been a while since I've taken a look at it, but Luke Redpath has
a plugin called Demeter's Revenge
(http://plugins.code.lukeredpath.co.uk/browser/demeters_revenge/trunk)
that actually manages this all for you by adding methods like
team.add_player that wrap chains like team.players.add. It's a year
old and I don't know if it works w/ the latest rails updates or not.

I think that if you're actually writing a bunch of boilerplate code
the same way over and over without a plugin like that, then it's
probably painful. With something like that it's painless and
expressive and seriously cleans up your controller code examples.

Glancing at github, I see one other library up there that tries to
solve the same problem. Will have to look closer later at
http://github.com/trotter/belongs_to_demeter.

Cool, thanks for the pointers there!

Ashley

--
http://www.patchspace.co.uk/
http://aviewfromafar.net/



_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to