<p>How do you perform delete and put operations restfully in rails? I have read the documentation and thought I was doing everything properly, but I can't seem to get it to work.</p>

<p>For example, if I wanted to delete an employee I would create a controller called "EmployeesController" and create a destroy method to perform the delete.</p>

<p>Then I went into the routes.rb file and entered <code>map.resources :employees</code>, which gives you access to the URL helper functions.</p>

<p>In whatever I want to call the Ajax operation from, I should just have a line like:</p>

<pre><code>&lt;%= link_to_remote "Delete", employee_path(@employee), :method =&gt; :delete %&gt;
</code></pre>

<p>When I click on the link, it is still is sending a POST operation, so it does nothing.</p>

<p>What am I missing or doing wrong?</p>

Try
```
```
:url => employee_url(@employee)
```
```
IIRC, *_path is a named route generated by the :resource directive which includes the method, thus overwriting your :method => :delete