Forum: Ruby on Rails polymorphic_url with link_to_remote

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7dc6183602c65b027a7ef7dd78c62a36?d=identicon&s=25 Franz M. (xinu)
on 2009-05-20 11:41
Hi.

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.

Thanks
Michael
This topic is locked and can not be replied to.