I have installed jquery-ujs driver and include jquery script in my
view.
In my view I have the following function
$(function () {
$('#alert').click(function () {
$.ajax({
type: "POST",
data: ({ lat: this.getAttribute('data-lat'), lon:
22.3908355 }),
url: '/map/setc'
//dataType: 'script'
});
return false;
})
});
but during the post authenticity_token is not send.
Authenticity token is only send with form_tag.
Is there anyway to use jQuery.ajaxSetup in order to append to the data
the authenticity token?
--
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