i currently have a feature on my application that requires an array persist over multiple requests. i originally put it in a session var and deleted it when i was done. this was great but i got to thinking it might be better resource-wise to pass it as a paramenter. problems arise when a redirect_to takes place. is it possible for a redirect_to to post instead of get (it seems to not be possible according to the docs). is there some other way or is the session approach best? thanks in advance. -mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
why would you think a redirect_to would cause a problem with the data stored in the session? On 7/17/07, mike <mikebannister-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > i currently have a feature on my application that requires an array > persist over multiple requests. i originally put it in a session var > and deleted it when i was done. this was great but i got to thinking > it might be better resource-wise to pass it as a paramenter. problems > arise when a redirect_to takes place. is it possible for a redirect_to > to post instead of get (it seems to not be possible according to the > docs). is there some other way or is the session approach best? thanks > in advance. > > -mike > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hi chris, i probably didn''t explain myself well. i meant to say this... i need to have an array that persists across multiple requests. originally i accomplished this by storing the array in the session until i was done with it then i deleted it. i decided that that was slightly cumbersome and possibly not efficient resource-wise. so i tried not storing it in the session at all but instead passing it along as a parameter via hidden form fields and query strings (with redirect_to) but it seems to not work well because when it''s passed as a query string rails doesn''t recognize it as an array anymore. i was wondering if maybe you can make redirect_to POST instead of GET cause then it seems i could pass my array in params without having to convert it from a string back to an array in the controller. i figure i''m either missing something big or small or i was on the right track originally when i used the session approach. what do you think? peace, mike On 7/17/07, Chris Hall <christopher.k.hall-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > why would you think a redirect_to would cause a problem with the data > stored in the session? > > On 7/17/07, mike <mikebannister-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > i currently have a feature on my application that requires an array > > persist over multiple requests. i originally put it in a session var > > and deleted it when i was done. this was great but i got to thinking > > it might be better resource-wise to pass it as a paramenter. problems > > arise when a redirect_to takes place. is it possible for a redirect_to > > to post instead of get (it seems to not be possible according to the > > docs). is there some other way or is the session approach best? thanks > > in advance. > > > > -mike > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
No that I am an expert, but I would stick with sessions rather than expose your data to the users, which may raise potential security issues. Andrew On Jul 18, 12:37 pm, "Michael Bannister" <mikebannis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi chris, > > i probably didn''t explain myself well. i meant to say this... > > i need to have an array that persists across multiple requests. > originally i accomplished this by storing the array in the session > until i was done with it then i deleted it. i decided that that was > slightly cumbersome and possibly not efficient resource-wise. so i > tried not storing it in the session at all but instead passing it > along as a parameter via hidden form fields and query strings (with > redirect_to) but it seems to not work well because when it''s passed as > a query string rails doesn''t recognize it as an array anymore. i was > wondering if maybe you can make redirect_to POST instead of GET cause > then it seems i could pass my array in params without having to > convert it from a string back to an array in the controller. i figure > i''m either missing something big or small or i was on the right track > originally when i used the session approach. what do you think? > > peace, > mike > > On 7/17/07, Chris Hall <christopher.k.h...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > why would you think a redirect_to would cause a problem with the data > > stored in the session? > > > On 7/17/07, mike <mikebannis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > i currently have a feature on my application that requires an array > > > persist over multiple requests. i originally put it in a session var > > > and deleted it when i was done. this was great but i got to thinking > > > it might be better resource-wise to pass it as a paramenter. problems > > > arise when a redirect_to takes place. is it possible for a redirect_to > > > to post instead of get (it seems to not be possible according to the > > > docs). is there some other way or is the session approach best? thanks > > > in advance. > > > > -mike--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> > i need to have an array that persists across multiple requests.that is the whole purpose of sessions. On 7/18/07, askegg <andrew.skegg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > No that I am an expert, but I would stick with sessions rather than > expose your data to the users, which may raise potential security > issues. > > Andrew > > On Jul 18, 12:37 pm, "Michael Bannister" <mikebannis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > hi chris, > > > > i probably didn''t explain myself well. i meant to say this... > > > > i need to have an array that persists across multiple requests. > > originally i accomplished this by storing the array in the session > > until i was done with it then i deleted it. i decided that that was > > slightly cumbersome and possibly not efficient resource-wise. so i > > tried not storing it in the session at all but instead passing it > > along as a parameter via hidden form fields and query strings (with > > redirect_to) but it seems to not work well because when it''s passed as > > a query string rails doesn''t recognize it as an array anymore. i was > > wondering if maybe you can make redirect_to POST instead of GET cause > > then it seems i could pass my array in params without having to > > convert it from a string back to an array in the controller. i figure > > i''m either missing something big or small or i was on the right track > > originally when i used the session approach. what do you think? > > > > peace, > > mike > > > > On 7/17/07, Chris Hall <christopher.k.h...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > why would you think a redirect_to would cause a problem with the data > > > stored in the session? > > > > > On 7/17/07, mike <mikebannis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > i currently have a feature on my application that requires an array > > > > persist over multiple requests. i originally put it in a session var > > > > and deleted it when i was done. this was great but i got to thinking > > > > it might be better resource-wise to pass it as a paramenter. problems > > > > arise when a redirect_to takes place. is it possible for a redirect_to > > > > to post instead of get (it seems to not be possible according to the > > > > docs). is there some other way or is the session approach best? thanks > > > > in advance. > > > > > > -mike > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---