Hello
I am trying to create a link to destroy and entry in the DB using AJAX but I also want it to function without JavaScript enabled
However the following code
<%=link_to_remote "Delete", :update => "section_phone", :url => {:controller => "phone_numbers", :action => "destroy", :id => phone_number_display.id }, :href => url_for(:controller => "phone_numbers", :action => "destroy", :id => phone_number_display.id)%>
produces the output
<a href="#" onclick="new Ajax.Updater('section_phone', '/phone_numbers/destroy/1', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('b64efb643e49e9af5e2e195a90fd5a8b6b99ece2')}); return false;">Delete</a>
For some reason the url_for does not work properly and the href tag is set to #. I do not know why this does not work since I am not notified of any errors in the log
Does anyone know why this could be?
Thank you