small medium large xlarge

Generic-user-small
11 Sep 2008, 03:21
Brett Goulder (2 posts)

A little bit further on(around page 112), I was getting a ActionController::InvalidAuthenticityToken error when I was trying to add items to my cart.

I added this code to application.rb:

protect_from_forgery :only => [:create, :update, :destroy]

To be honest, I’m not quite sure what I did(I’m still new to RoR) but it seemed to get it working again.

Cheers,

Brett

Samr_small_pragsmall
11 Sep 2008, 10:54
Sam Ruby (634 posts)

If you ever restart your server, before you submit any form you need to refresh the page containing the form. I’ll add a note.

You must be logged in to comment