Nested routes with :keys
Reported by Peter | July 22nd, 2008 @ 03:35 AM | in 0.9.9
I'm trying do pass :keys => [:login] to my nested route but is not generating the expected url:
users/login_name/photos/1
Instead I'm getting:
users//photos/2
Route:
r.resources :users, :keys => [:login] do |user|
user.resources :photos
end
Model:
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :login, String
has n, :photos
end
View:
<%= link_to image_tag(photo.public_url), url(:user_photo, photo) %>
Comments and changes to this ticket
-
Peter July 22nd, 2008 @ 03:39 AM
- → Tag changed from to helpers routing
Related or same as this ticket?
http://merb.lighthouseapp.com/pr...
But I think if you use the :keys you shouldn't need to define to_param in your model, am I correct?
-
Michael Klishin (antares) August 2nd, 2008 @ 06:35 PM
- → Milestone changed from to 0.9.5
- → State changed from new to open
Router is being reworked at the moment. Stay tuned.
-
Carl Lerche August 7th, 2008 @ 10:36 AM
- → Assigned user changed from to Carl Lerche
-
Michael Klishin (antares) August 12th, 2008 @ 08:06 PM
- → Milestone changed from 0.9.5 to 0.9.6
-
Michael Klishin (antares) September 4th, 2008 @ 11:52 AM
- → Milestone changed from 0.9.6 to 0.9.7
-
Michael Klishin (antares) September 14th, 2008 @ 01:59 AM
- → Milestone changed from 0.9.7 to 0.9.9
-
Carl Lerche September 21st, 2008 @ 12:53 AM
- → Tag changed from helpers routing to helpers routing
- → State changed from open to resolved
The new router branch has been merged in. This should not be a problem anymore.
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 »
