views:

28

answers:

1

I experimented the permanent cookies shortcut with Rails 3.0 (and Ruby 1.9.2) but I can't write in this hash.
I try with the following code :

cookies.permanent[:last_used_expiration_delay] = @snippet.expiration_delay

But the hash remains empty (here is the YAML dump) :

 --- !map:ActionDispatch::Cookies::PermanentCookieJar {}

Basic cookies works well, so I can specify the expiration date manually with the old syntax but I would like to use the cool new stuff of Rails 3.

Is there something to do for permanent cookies to work properly ?

A: 

I found my response: cookies.permanent is only used to write. To read, simply look the key in cookies hash.

Sephi-Chan