Cookies are broken


#1

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]
end
return 0
end


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
#<#Class:0x25b8ca8:0x25b8870>

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


#2

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


#3

Joe B. wrote:

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

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