Nested routes with :keys
Reported by Peter | July 21st, 2008 @ 08:35 PM | in 0.9.7
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 21st, 2008 @ 08:39 PM
- → 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 @ 11:35 AM
- → State changed from new to open
- → Milestone changed from to 0.9.5
Router is being reworked at the moment. Stay tuned.
-
Carl Lerche August 7th, 2008 @ 03:36 AM
- → Assigned user changed from to Carl Lerche
-
Michael Klishin (antares) August 12th, 2008 @ 01:06 PM
- → Milestone changed from 0.9.5 to 0.9.6
-
Michael Klishin (antares) September 4th, 2008 @ 04:52 AM
- → Milestone changed from 0.9.6 to 0.9.7
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 »
