Ruby on Rails Monday, May 31, 2010

Hi,

I ve got a question concerning delete actions in the new rails 3 world
with unobtrusive javascript.

How may I perform an "ajax" delete in a list of products.

if attribute data-method is specified rails.js handleMethod is
called,
which adds csrf params into a hidden form and form.submit is called.
Works great, but form.submit is nt performed as an ajax request.

Using data-remote instead of data-method would nt add csrf params.

What s the best approach to achieve what I need?

Thanks a lot in advance.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment