You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Rails 4, in order for the AJAX comments to work, the form_for in app/views/blogit/comments/_form.html.erb needs authenticity_token: true as an option, otherwise posting a comment throws an exception for invalid CSRF token.
Not sure if that's a bug or it's documented/configurable somewhere.
The text was updated successfully, but these errors were encountered:
arnaudoff
changed the title
Add :authenticity_token
Add :authenticity_token in comments form
May 15, 2016
In Rails 4, in order for the AJAX comments to work, the
form_for
inapp/views/blogit/comments/_form.html.erb
needsauthenticity_token: true
as an option, otherwise posting a comment throws an exception for invalid CSRF token.Not sure if that's a bug or it's documented/configurable somewhere.
The text was updated successfully, but these errors were encountered: