# Rails 3 data-method vs \_method

**URL:** <https://www.ruby-forum.com/t/rails-3-data-method-vs-method/190702>\
**Category:** Rails\
**Created:** [June 25, 2010, 8:55am UTC](https://www.ruby-forum.com/t/rails-3-data-method-vs-method/190702 "2010-06-25T08:55:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 25, 2010, 8:55am UTC](https://www.ruby-forum.com/t/rails-3-data-method-vs-method/190702/1 "2010-06-25T08:55:16Z")

</div>

Hi,

I would like to know if and how new data-method attribute should work  
together with \_method url parameter

Please take a look at the following example:  
[Delete](https://www.ruby-forum.com/players/13/logic_delete?_method=delete)

A link to trigger action logic\_delete and we should use REST delete  
method type.  
In Rails 3 with new UJS this will not work if javascript is enabled.  
To get that working we have to do the following:  
[Delete](https://www.ruby-forum.com/players/13/logic_delete?_method=delete)

That link should work if javascript enabled/disabled, but I have to  
say twice that I would like to use data-method delete.

I would like to know if this is the way to go or if \_method parameter  
is depreciated by the rails guys?  
The reason might be to say that a traditional(non ajaxed) GET should  
be really a GET and should nt change any data.

–  
Volker
