#279 √ resolved
Matt Aimonetti (mattetti)

router to detect routes based on params

Reported by Matt Aimonetti (mattetti) | April 22nd, 2008 @ 09:35 AM

the router needs to be smarter about matching all available params to a route.

Here is the use case:

I was looking at merb_paginate's plugin. I have nested resources routes as follows:

r.resources :artists do |artists|

artists.resources :photos

end

no default routes.

I want to paginate an artist photos in photos controller:

http://localhost:4000/artists/1/...

I would like the plugin view helper to generate a url such as:

http://localhost:4000/artists/1/...

The problem is that it only generates urls such as:

http://localhost:4000/photos/ind...

I can't seem to find a way to generate the proper url by just passing the params and obviously because I need to generate dynamic routes, I can't rely on the user to pass the named route.

-Matt

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »