Forum: Ruby on Rails polymorphic_url with link_to_remote

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Franz M. (Guest)
on 2009-05-20 13:41

I want to user the following link_to_remote with a polymporphic_url.

<%= link_to_remote "delete", :url => blog_entry_photo_path(entry,
photo),:confirm => "Are your sure?", :method => :delete %>

This generates a not working link, without the photo_id.
<%= link_to_remote 'delete', polymorphic_url([entry, photo], {:format =>
'js'}), :confirm => 'Are you sure?', :method => :delete %>

Can anyone help me.

This topic is locked and can not be replied to.