I'm stumped.  My link_to that is supposed to generate a DELETE is
generating a GET.  And I don't understand why.  Can anyone suggest what
I should be looking for to debug this?  (The one thing I can think of is
that I'm including jquery.js and perhaps messed up the js?)  Here's the
partial with the link_to:

=== file: app/views/premises/_premise.html.erb
...
<%= link_to "delete",
         premise,
         :method => :delete,
         :confirm => "Positive?",
         :title => "Delete #{premise.address}" %>

... and the generated log entry:

Started GET "/premises/1" for 127.0.0.1 at 2011-01-26 13:33:19 -0800
  Processing by PremisesController#show as HTML
  Parameters: {"id"=>"1"}

Other details:

The partial is called from:
=== file: app/views/premises/index.html.erb
...
  <%= render :partial => "premise", :collection => @premises %>

Routing is restful:
=== file: config/routes.rb
Demo::Application.routes.draw do
  ...
  resources :premises
  ...

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to