title: Rails Resource Restful Routes Helper functions and nil oject error
body: <p>I am getting an error when trying to use the resource route helper functions</p>
  
  <pre><code>    &lt;%= link_to_remote "Delete", {
          :method =&gt; :delete, 
          :url=&gt; phone_numbers_url(phone_number_display.id), 
          :update =&gt; "section_phone"
          }%&gt;
  </code></pre>
  
  <p>and in my routes i have </p>
  
  <pre><code>       map.resources :phone_numbers
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code> You have a nil object when you didn't expect it!
   The error occurred while evaluating nil.to_sym
  </code></pre>
  
  <p>When I use</p>
  
  <pre><code>:url=&gt; phone_numbers_url(:id =&gt; phone_number_display.id)
  </code></pre>
  
  <p>I no longer get the error but I get the unrestful url of</p>
  
  <pre><code> http://localhost:3000/phone_numbers?id=1
  </code></pre>
  
  <p>I do no understand this error as phone_number_display.id is not null</p>