Cookies are broken

Hi all,
I’m getting errors whenever I try to do anything with cookies. Here is
the offending code fragment, this is in app/helpers/news_helper.rb :

def last_survey_answered
if cookies[:survey_answered]
return cookies[:survey_answered]
return 0

I have also tried simple cookie commands such as:
cookie[:test] = “Hi” . The error I’m getting is:

undefined local variable or method `cookies’ for

Do I need to install a gem?? I tried upgrading rails to the latest
version (0.14.3) and the error is the same. Please help. Thanks

– Zach

i think you miss a ‘s’
cookies[:test] = “Hi”

Joe B. wrote:

i think you miss a ‘s’
cookies[:test] = “Hi”

still doesn’t work… its driving me mad too.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs