« The Tainted Edition | Main | SafeErb for Rails 2 »
Friday
Jan182008

InvalidAuthenticityToken for in_place_editing?

There is a problem with InvalidAuthenticityToken errors that are raised in the methods for the in_place_editing plugin. This happens in Rails 2.0.2 (and possibly earlier versions). It's because there is no authenticity_token sent at all. You can apply this patch until there is a new version out.

If you have something like this:

<%= in_place_editor("title", {:url => url_for(:action => "update_title" ...)}) %>

the update_title method will throw an error. Apply the patch to make it work.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (2)

Thanks for the tip

February 1, 2008 | Unregistered CommenterReda

In use of the rails of the test, i don't understand. I hope I can improve through learning this respect. But overall, it's very nice. Thank you for your share!

June 25, 2010 | Unregistered CommenterAcronym List

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>