Loading...

ActionController::InvalidAuthenticityToken

Software
Jul 21, 2010
#ruby
Avatar
Author
Matt Kruskamp

Rails issue I ran into. I wrote a controller action and then wrote a small form to hit the controller action. The result? A big fat error. Apparently for security purposes there is a hidden field that is generated by using the form_for tag. Or you can custom code the hidden field like so:

<input type=“hidden” name=“authenticity_token” value=“<%= form_authenticity_token%>” />
1 min read
Share this post:

Comments

comments powered by Disqus

Related Articles

All articles

The pixel mine

I'm currently the Co-Founder / CTO with an amazing team at Rentler. We build property management software for independant landlords and their renters using a plethora of technologies.

View work
Illustration Illustration
Top