# Polymorphic\_url with link\_to\_remote

**URL:** <https://www.ruby-forum.com/t/polymorphic-url-with-link-to-remote/168396>\
**Category:** Rails\
**Created:** [May 20, 2009, 11:41am UTC](https://www.ruby-forum.com/t/polymorphic-url-with-link-to-remote/168396 "2009-05-20T11:41:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xinu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/f6c823/32.png) [@xinu](https://www.ruby-forum.com/u/xinu)\
**Post date:** [May 20, 2009, 11:41am UTC](https://www.ruby-forum.com/t/polymorphic-url-with-link-to-remote/168396/1 "2009-05-20T11:41:17Z")

</div>

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
