Re: session question..

Frederick Cheung
Fri, 10 Oct 2008 10:58:10 -0000

On Oct 10, 11:46 am, Jay Pangmi
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
> Frederick Cheung wrote:
> > On 10 Oct 2008, at 10:35, Jay Pangmi wrote:
> > Fred
>
> Sorry for the silly questions, so will I save carts id in the session.
> Can this work?
>
> @cart=Cart.new(params[:cart])
>
this won''t work, because you haven''t saved the cart object (so
it has
no id)

> session[:cart]=-OU5NxZaKaso@public.gmane.org
>
> and later how can I retrieve id from the session?
>
The same as retrieving any other value from the sesion (ie
session[:cart])

Fred
> thanks Fred.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com