Protect_from_forgery and page caching issue

Hello,

Using Rails 2.0.2, I have an issue with page caching and
protect_from_forgery :

In application.rb, I have this
protect_from_forgery :secret =>
‘1c8b953667056f1a3c324d6b369f6158’, :only => [:create, :edit, :update]

In my generated page, I have both

//

in the header, and

And still in application controller if !session session :session => new end

Unfortunately, I keep having error 500 everytime I try to post a
comment. Here is the error dump :
NoMethodError (undefined method session_id' for {}:Hash): /vendor/ rails/actionpack/lib/action_controller/request_forgery_protection.rb: 126:in authenticity_token_from_session_id’ /vendor/rails/actionpack/
lib/action_controller/request_forgery_protection.rb:108:in
form_authenticity_token' /vendor/rails/actionpack/lib/ action_controller/request_forgery_protection.rb:98:in verified_request?’ /vendor/rails/actionpack/lib/action_controller/
request_forgery_protection.rb:86:in `verify_authenticity_token’

Any idea about what happens ?
Regards,
Frédéric

Frédéric de Villamil
[email protected] tel: +33 (0)6 62 19 1337
http://fredericdevillamil.com Typo : http://typosphere.org