title: Rails link_to_remote degradation and url_for
body: <p>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</p>
  
  <p>However the following code</p>
  
  <pre><code>&lt;%=link_to_remote "Delete", :update =&gt; "section_phone", :url =&gt; {:controller =&gt; "phone_numbers", :action =&gt; "destroy", :id =&gt; phone_number_display.id }, :href =&gt; url_for(:controller =&gt; "phone_numbers", :action =&gt; "destroy", :id =&gt; phone_number_display.id)%&gt;
  </code></pre>
  
  <p>produces the output</p>
  
  <pre><code> &lt;a href="#" onclick="new Ajax.Updater('section_phone', '/phone_numbers/destroy/1', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('b64efb643e49e9af5e2e195a90fd5a8b6b99ece2')}); return false;"&gt;Delete&lt;/a&gt;
  </code></pre>
  
  <p>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</p>
  
  <p>Does anyone know why this could be?</p>
  
  <p>Thank you</p>