MrBanabas-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2010-Jun-25 06:54 UTC
Rails 3 data-method vs _method
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: <a href="/players/13/logic_delete?_method=delete">Delete</a> 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: <a href="/players/13/logic_delete?_method=delete" data-remote=''true'' data-method=''delete''>Delete</a> 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.