#408 open
Peter

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

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 »

Shared Ticket Bins