title: difference between resource and controller generators
body: <p>when I do </p>
  
  <pre><code>rails g model user name:string
  rails g controller users index create new destroy show
  </code></pre>
  
  <p>and edit config/routes.rb to add:</p>
  
  <pre><code>resource :users
  </code></pre>
  
  <p>bundle exec rake routes gives:</p>
  
  <pre><code>     users POST   /users(.:format)      {:action=&gt;"create", :controller=&gt;"users"}
   new_users GET    /users/new(.:format)  {:action=&gt;"new", :controller=&gt;"users"}
  edit_users GET    /users/edit(.:format) {:action=&gt;"edit", :controller=&gt;"users"}
             GET    /users(.:format)      {:action=&gt;"show", :controller=&gt;"users"}
             PUT    /users(.:format)      {:action=&gt;"update", :controller=&gt;"users"}
             DELETE /users(.:format)      {:action=&gt;"destroy", :controller=&gt;"users"}
  </code></pre>
  
  <p>however, when I do</p>
  
  <pre><code>rails g resource users name:string
  </code></pre>
  
  <p>(which automatically adds resources :users to config/routes.rb) 
      bundle exec rake routes </p>
  
  <p>I get</p>
  
  <pre><code>    users GET    /users(.:format)          {:action=&gt;"index", :controller=&gt;"users"}
            POST   /users(.:format)          {:action=&gt;"create", :controller=&gt;"users"}
   new_user GET    /users/new(.:format)      {:action=&gt;"new", :controller=&gt;"users"}
  edit_user GET    /users/:id/edit(.:format) {:action=&gt;"edit", :controller=&gt;"users"}
       user GET    /users/:id(.:format)      {:action=&gt;"show", :controller=&gt;"users"}
            PUT    /users/:id(.:format)      {:action=&gt;"update", :controller=&gt;"users"}
            DELETE /users/:id(.:format)      {:action=&gt;"destroy", :controller=&gt;"users"}
  </code></pre>
  
  <p>So my question is,</p>
  
  <p>when I generate a controller how can I get the correct helper methods to make
  link_to 'Destroy', instance, :method=> :delete 
  work?</p>
  
  <p>Because currently it gives an error user_path is not defined.</p>