Eric,

The line is in the application.rb file.  Mine looked like this:

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time

  # See ActionController::RequestForgeryProtection for details
  # Uncomment the :secret if you're not using the cookie session store
  #protect_from_forgery # :secret => '*****'

Your secret will be different. In the original file, the 
protect_from_forgery part wasn't commented out.

The application.rb file lives in your apps/controllers directory.

Good luck,
LG



Eric Larson wrote:
> Hi,
> 
> On Jan 16, 7:48 am, Michael Schuerig <[email protected]> wrote:
>> >http://localhost:3000/projects/3
>> > ActionController::InvalidAuthenticityToken
>> at the token with form_authenticity_token; I have no good idea what to
>> do to access the app from the commandline with curl or similar.
>>
> 
> The problem is that the client being used does not work with cookies
> by default. This is a totally reasonable and somewhat probable
> solution in a RESTful service seeing as it is moving state (the
> session/secret cookie saying who you are) out of the URL. A simple
> client such as cURL can deal with cookies but should not have to.
> 
>> In general, you have to request something from the app that includes the
>> authenticity token. It is automatically included in forms and in
>> destroy links.
>>
> 
> I'm having the same problem. While I respect the need for it and do
> not argue its value, it would be really helpful to see how to turn it
> off. For example, I tried commenting out the
> "config.action_controller.session" in my environment.rb but that
> didn't work. I admit I'm new to Rails so that might have been a really
> dumb way to go about it, so if other have better ideas including how
> to grok some portion of the docs, it is very appreciated.
> 
> ----
> 
> Eric Larson
> http://ionrock.org/blog/

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to