I'm using jquery mobile in a rails 3.0 app. I am getting a routing error when attempting to delete an item from a user's list. The code and error message are as follows.
index.mobile.erb:
<% @items.each do |i| %>
...
<div data-role="button">
<%= link_to 'Delete', i, :confirm => 'Are you sure?', :method => :delete %>
</div>
<% end %>
routes file:
resources :items, :except => [:show]
rake routes:
DELETE /items/:id(.:format) {:action=>"destroy", :controller=>"items"}
error message:
Started GET "/items/2" for 127.0.0.1 at 2012-02-26 13:31:37 -0500
ActionController::RoutingError (No route matches "/items/2"):
What am I missing?
Thanks!
UPDATE - Firebug: @http://localhost:3000/javascripts/jquery-1.6.1.js?1310343332:641 @http://localhost:3000/javascripts/jquery.mobile-1.0.1.js?1329380575:2737 @http://localhost:3000/javascripts/jquery.mobile-1.0.1.js?1329380575:3030 @http://localhost:3000/javascripts/jquery.mobile-1.0.1.js?1329380575:3393 @http://localhost:3000/javascripts/jquery-1.6.1.js?1310343332:2926 @http://localhost:3000/javascripts/jquery-1.6.1.js?1310343332:2560 jquery...0343332 (line 641) "NetworkError: 404 Not Found - http://localhost:3000/items/2"