How Does Rails 3's "data-method='delete'" Degrade Gracefully?

Posted by viatropos on Stack Overflow See other posts from Stack Overflow or by viatropos
Published on 2010-05-11T08:46:54Z Indexed on 2010/05/23 0:50 UTC
Read the original article Hit count: 225

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?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby-on-rails3