Hi --
I've written a little plugin -- consisting entirely of modifications to define_url_helper in ActionController -- which will infer nested named RESTful route components from one object.
For example, given a nest like this:
map.resources :schools do |s| s.resources :departments do |d| d.resources :teachers end end
instead of doing this:
teacher_url(@school, @department, @teacher)
the plugin lets you do:
teacher_url(@teacher)
and it infers that you really want:
teacher_url(@teacher.department.school, @teacher.department, @teacher)
It's very much a "see if people like it" kind of thing. So let me know.
You can get it via subversion from:
http://www.risleydale.net/svn/inferred_routes/tags/0.1.0
David