DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

William has posted 8 posts at DZone. View Full User Profile

Authenticity_token Problem Solved

09.23.2009
| 5435 views |
  • submit to reddit
        You should send your request along with the form_authenticity_token

new Ajax.Request("/locations/save/", {
  method: "post",
  parameters: {"authenticity_token":"<%= form_authenticity_token %>", "id":locationId}
});