Hi all: Could you tell me how to transfer an object from one page to another? because the object should be used in both of these two pages. for now, I just know transferring parameter via :id and select object again in another page, but I think this soluction is too fool...hehe. I am a newer for ROR, so I just can know this way. Could you tell me how to deal with it with object re-used? Thanks Tony Shih -- 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 -~----------~----~----~----~------~----~------~--~---
You can pass an object from one page to another by using flash[:my_object] = @my_object then you would access it on the other page with flash[:my_object] though this may not be your best solution. On Apr 10, 12:59 pm, Shih Tony <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi all: > > Could you tell me how to transfer an object from one page to another? > because the object should be used in both of these two pages. for now, I > just know transferring parameter via :id and select object again in > another page, but I think this soluction is too fool...hehe. I am a > newer for ROR, so I just can know this way. Could you tell me how to > deal with it with object re-used? > > Thanks > Tony Shih > -- > 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 For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
http://membres.lycos.fr/ccpfordz 2008/4/10, edberner <eberner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > > You can pass an object from one page to another by using > flash[:my_object] = @my_object > then you would access it on the other page with flash[:my_object] > though this may not be your best solution. > > On Apr 10, 12:59 pm, Shih Tony <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > Hi all: > > > > Could you tell me how to transfer an object from one page to another? > > because the object should be used in both of these two pages. for now, I > > just know transferring parameter via :id and select object again in > > another page, but I think this soluction is too fool...hehe. I am a > > newer for ROR, so I just can know this way. Could you tell me how to > > deal with it with object re-used? > > > > Thanks > > Tony Shih > > -- > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---