Rails 3 does some cool stuff to make Javascript unobtrusive, so they've done things like this:
= link_to "Logout", user_session_path, :method => :delete
..converts to
<a href="/logout" data-method="delete" rel="nofollow">Logout</a>
But it just occurred to me.. When I turn off javascript the method isn't DELETE anymore, it's GET as expected. So are there plans to, or is there some way to, allow these data-
attributes to degrade gracefully, so that link still is a DELETE request?
button_to
worked because it turns it into a form on the Ruby side of things instead of with JavaScript after the page is loaded. I'd never heard ofbutton_to
before, so thank you! – Inviting