Hi everyone –
I’ve updated my Inferred Routes plugin for Rails 2.0. The plugin,
which is somewhat experimental, lets you do this:
collection_item_path(@item)
instead of:
collection_item_path(@item.collection, @item)
and similarly with other nested routes. Basically, the idea is to
prevent you from having to type the whole drill-down of objects.
There are limitations to the plugin – in particular, it only knows
about very vanilla, default association and route naming, and it
doesn’t work with form_for. But if you’d like to save some typing of
easily inferred objects, you might like it (or want to improve it or
suggest improvements).
You can get Inferred Routes at:
http://www.risleydale.net/svn/plugins/inferred_routes
David
–
Rails training from David A. Black and Ruby Power and Light:
INTRO TO RAILS June 9-12 Berlin
ADVANCING WITH RAILS June 16-19 Berlin
INTRO TO RAILS June 24-27 London (Skills Matter)
See http://www.rubypal.com for details and updates!