hi, i m calling following method on " onclick " event of checkbox and i m getting id of all selected checkboxes, but now i want to store multiple ids to store in session , can i? or any other options? def checksel @data="" data = params[:p_id] stat=params[:stat] if stat=="true" @tmp = data end end -- Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
''The easy way is to concatenate the ids and store in the session variable'' -- Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 9, 5:24 am, Trupti Bhatt <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> hi, > > i m calling following method on " onclick " event of checkbox and i m > getting id of all selected checkboxes, but now i want to store multiple > ids to store in session , can i? or any other options? > > def checksel > @data="" > > data = params[:p_id] > stat=params[:stat] > > if stat=="true" > @tmp = data > > end > end > > -- > Posted viahttp://www.ruby-forum.com/.You can store all kinds of stuff in a session, but it will all get stored on your disk or wherever your sessions are stored and could take up alot of space if you don''t clear it out over time. suppose myrec was an array of some kind of records. You could store as many as you like in the session: myid = :''id432343'' @session[myid] = myrec[0] myid = :''id432343'' @session[myid] = myrec[1] ... ... --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---