title: Destroy path not working in Ruby on Rails
body: <p>Totally stumped on this as I believe it's using the correct restful setup but I can't seem to delete my list. </p>
  
  <p>I have the following:</p>
  
  <p>Controller:</p>
  
  <pre><code>def destroy
      @list = List.find(params[:id])
      @list.destroy
      redirect_to lists_path
  end 
  
  #37 def show
  #38     @list = List.find(params[:id])
  #39 end
  </code></pre>
  
  <p>Index.html.haml</p>
  
  <pre><code>- @list.each do |list| 
      ...
      = link_to "Delete", list_path(list), method: :delete, data: { confirm: 'Are you certain you want to delete this?' }
      ...
  </code></pre>
  
  <p>Routes: </p>
  
  <pre><code>ListApp::Application.routes.draw do
      devise_for :users
      resources :lists
  </code></pre>
  
  <p>Which is giving the correct rake routes output of:</p>
  
  <pre><code>           lists GET    /lists(.:format)               lists#index                                                                                                                                                                     
                   POST   /lists(.:format)               lists#create                                                                                                                                                                    
          new_list GET    /lists/new(.:format)           lists#new                                                                                                                                                                       
         edit_list GET    /lists/:id/edit(.:format)      lists#edit                                                                                                                                                                      
              list GET    /lists/:id(.:format)           lists#show                                                                                                                                                                      
                   PATCH  /lists/:id(.:format)           lists#update                                                                                                                                                                    
                   PUT    /lists/:id(.:format)           lists#update                                                                                                                                                                    
                   DELETE /lists/:id(.:format)           lists#destroy
  </code></pre>
  
  <p>But I am still getting the following error when running in production environment.</p>
  
  <pre><code>I, [2013-09-10T15:27:40.338022 #453]  INFO -- : Started GET "/lists/2" for 81.159.35.212 at 2013-09-10 15:27:40 +0000                                                                                                                          
  I, [2013-09-10T15:27:40.340626 #453]  INFO -- : Processing by ListsController#show as HTML                                                                                                                                                     
  I, [2013-09-10T15:27:40.340867 #453]  INFO -- :   Parameters: {"id"=&gt;"2"}                                                                                                                                                                      
  I, [2013-09-10T15:27:40.354092 #453]  INFO -- : Completed 500 Internal Server Error in 13ms                                                                                                                                                    
  F, [2013-09-10T15:27:40.359807 #453] FATAL -- :                                                                                                                                                                                                
  NameError (undefined local variable or method `list' for #&lt;ListsController:0x000000050a7c38&gt;):                                                                                                                                                 
    app/controllers/lists_controller.rb:38:in `show'  
  </code></pre>
  
  <p>If anyone knows what could be causing this any help would be much appreciated :)</p>