#475 √ invalid
Carl Lerche

Not able to set cookies with cookies[:name] = { ... }

Reported by Carl Lerche | September 12th, 2008 @ 06:25 AM

It seems that I am not able to set cookies with the convenient Hash assignment method:


cookies[:name] = { :expires => Time.now, :value => "Hello world" }

It seems that this code was removed from the code base and there don't seem to be any specs defining this feature. I was not sure if this was intentional or not.

Thanks.

Comments and changes to this ticket

  • Fabien Franzen (loob2)

    Fabien Franzen (loob2) September 12th, 2008 @ 09:22 AM

    • → State changed from “new” to “invalid”

    This is indeed intentional, from PUBLIC_CHANGELOG:

    8/22/2008: * controller.cookies['foo'] = { ... } (Hash with options) is now deprecated; use controller.cookies['foo'] = 'bar' for simple cookies without options, or use controller.cookies.set_cookie('foo', 'bar', options) for more control.

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket