I tried to modify the cookies in an action method of ActionController but got the error message about frozen Hash. So when and where can I add something the @cookies ? And where is this documented ? Warren Seltzer _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 25, 2005, at 11:13 AM, Warren Seltzer wrote:> I tried to modify the cookies in an action method of > ActionController but got the error > > message about frozen Hash. So when and where can I add something > the @cookies ? > > And where is this documented ?http://api.rubyonrails.org/classes/ActionController/Cookies.html jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDXnoDAQHALep9HFYRAk7lAJ9HYtSorLfMdaXshE0o+fxepIPYfwCgwCx2 GPYZPOV6FHtR5nvriDj1Y8c=Qoq9 -----END PGP SIGNATURE-----
Yes, I read that. It doesn''t help. Warren Seltzer
Warren, I assume you''re doing something like this: @cookies[''warren''] = ''wont_work'' Try this instead: cookies[''warren''] = ''hey_it_worked'' -Doug On 10/25/05, Warren Seltzer <warrens-uf+uqdaZT6qTt3WsUyM9gg@public.gmane.org> wrote:> Yes, I read that. It doesn''t help. > > Warren Seltzer > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Yes, it worked. Danged if I know why. In the view I have <%= debug @cookies %> And it won''t work without the at-sign. Warren Seltzer -----Original Message----- From: Doug Fales [mailto:doug.fales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org] Sent: Wednesday, October 26, 2005 2:01 AM To: warrens-uf+uqdaZT6qTt3WsUyM9gg@public.gmane.org; rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Frozen Cookies Warren, I assume you''re doing something like this: @cookies[''warren''] = ''wont_work'' Try this instead: cookies[''warren''] = ''hey_it_worked'' -Doug On 10/25/05, Warren Seltzer <warrens-uf+uqdaZT6qTt3WsUyM9gg@public.gmane.org> wrote:> Yes, I read that. It doesn''t help. > > Warren Seltzer > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >