[ANN] Inferred Routes plugin for Rails 2.0

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!

Those of us who have nested resources 4-5 levels deep thank you. :wink:

–Jeremy

On Sat, Apr 19, 2008 at 6:51 PM, David A. Black [email protected]
wrote:

collection_item_path(@item.collection, @item)
You can get Inferred Routes at:
INTRO TO RAILS June 24-27 London (Skills Matter)
See http://www.rubypal.com for details and updates!


http://jeremymcanally.com/
http://entp.com

Read my books:
Ruby in Practice (http://manning.com/mcanally/)
My free Ruby e-book (http://humblelittlerubybook.com/)

Or, my blogs:
http://mrneighborly.com
http://rubyinpractice.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs