Skip to content
Tags

Why is my session being reset when I POST/DELETE in Rails 3?!

June 8, 2011

In Rails 3, the InvalidAuthenticityToken error is no longer used. Instead the submit will fail silently and reset your session.

This totally baffled me when I set up a javascript to POST my delete links and I suddenly started getting logged out. You have to remember to include the authenticity token to protect against this symptom.

http://stackoverflow.com/questions/6090063/rails-3-protect-from-forgery-not-working-correctly

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: