Ok, so I''m not trying to do anything with frozen hash. In fact, from what I know, people usually don''t consume it frozen. Smoking is the preferred method. But then again, I have seen ''space'' cookies in Amsterdam featuring hash as an ''active'' ingredient. Anyway, in a pang of hunger I tried to set a cookie in my controller but I keep getting getting the error "can''t modify frozen hash". Any ideas? or should I find something else in the fridge?
try cookies[''somevar''] = ''some value'' instead of @cookies[''somevar''] ''some value'' you use @cookies in views/templates, cookies in controllers. On Apr 2, 2005 1:09 AM, H M <airmalik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok, so I''m not trying to do anything with frozen hash. In fact, from > what I know, people usually don''t consume it frozen. Smoking is the > preferred method. But then again, I have seen ''space'' cookies in > Amsterdam featuring hash as an ''active'' ingredient. > > Anyway, in a pang of hunger I tried to set a cookie in my controller > but I keep getting getting the error "can''t modify frozen hash". > > Any ideas? or should I find something else in the fridge? > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Alan, that fixed the problem. Thanks! Just so I understand this, can you explain why @ works for session and not for cookies in a controller? Both are instance methods of ActionController. On Apr 2, 2005 2:28 AM, Alan Bullock <liststuff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: try cookies[''somevar''] = ''some value'' instead of @cookies[''somevar''] > ''some value''> > you use @cookies in views/templates, cookies in controllers. > > On Apr 2, 2005 1:09 AM, H M <airmalik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Ok, so I''m not trying to do anything with frozen hash. In fact, from > > what I know, people usually don''t consume it frozen. Smoking is the > > preferred method. But then again, I have seen ''space'' cookies in > > Amsterdam featuring hash as an ''active'' ingredient. > > > > Anyway, in a pang of hunger I tried to set a cookie in my controller > > but I keep getting getting the error "can''t modify frozen hash". > > > > Any ideas? or should I find something else in the fridge? >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails