mercredi 29 avril 2015

Rails' link_to method: :delete not recognized on ipad. Sends GET request

There are many answers to similar questions that say to add

//= require jquery //= require jquery_ujs

to the application.js file. I already have these. My links work perfectly on desktop, however on the iPad, even though the link has the data-method="delete", the server still treats it as a GET request.

What is the fix to make this work on an ipad?

Here is my code:

<%= link_to "/things/#{thing.id}", :class => 'cool-thing', :method => :delete do %> <img src=awesome.png> <% end %>

Aucun commentaire:

Enregistrer un commentaire