I''m trying to set a multi-value cookie but for some reason it''s not working. Any help would be appreciated. cookies[:user] = { :value => {:email=>params[:login][:email], :passwd=>params[:login][:passwd]}, :expires => 30.days.from_now, :path => "/login"} -- Thiago Jackiw
On 1/27/06, Thiago Jackiw <thiago@mingle.com> wrote:> I''m trying to set a multi-value cookie but for some reason it''s not > working. Any help would be appreciated. > > cookies[:user] = { :value => {:email=>params[:login][:email], > :passwd=>params[:login][:passwd]}, :expires => 30.days.from_now, :path > => "/login"} > > -- > > Thiago Jackiw > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >You really should be setting that in the session. It''s a particularly bad idea to be storing a cleartext password in a cookie. -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261
Kyle Maxwell wrote:> On 1/27/06, Thiago Jackiw <thiago@mingle.com> wrote: >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > You really should be setting that in the session. It''s a particularly > bad idea to be storing a cleartext password in a cookie. > > -- > Kyle Maxwell > Chief Technologist > E Factor Media // FN Interactive > kyle@efactormedia.com > 1-866-263-3261Well, true, but that isn''t the point, the password will be md5 hashed. The point is that it''s not accepting an array as the value and I need it to be a cookie. Any ideas? -- Posted via http://www.ruby-forum.com/.
On 1/27/06, Thiago Jackiw <thiago@mingle.com> wrote:> Kyle Maxwell wrote: > > On 1/27/06, Thiago Jackiw <thiago@mingle.com> wrote: > >> > >> _______________________________________________ > >> Rails mailing list > >> Rails@lists.rubyonrails.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > > > > You really should be setting that in the session. It''s a particularly > > bad idea to be storing a cleartext password in a cookie. > > > > -- > > Kyle Maxwell > > Chief Technologist > > E Factor Media // FN Interactive > > kyle@efactormedia.com > > 1-866-263-3261 > > Well, true, but that isn''t the point, the password will be md5 hashed. > The point is that it''s not accepting an array as the value and I need it > to be a cookie. Any ideas? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >I would expect that you have to serialize the data. In Ruby that is done using the Marshal class. -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261