I''m developing on Mac OS X and stuff I''m sticking in flash is sticking around for two requests. For example: /foo <- sets flash[:notice] /bar <- flash[:notice] is displayed on /baz <- flash[:notice] is also displayed on /fubar <- flash[:notice] is NOT displayed Any idea why flash is persisting for two requests? Thanks, Joe -- 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 -~----------~----~----~----~------~----~------~--~---
Joe Ruby MUDCRAP-CE wrote:> I''m developing on Mac OS X and stuff I''m sticking in flash is sticking > around for two requests. For example: > > /foo <- sets flash[:notice] > /bar <- flash[:notice] is displayed on > /baz <- flash[:notice] is also displayed on > /fubar <- flash[:notice] is NOT displayed > > Any idea why flash is persisting for two requests? > > Thanks, > Joeflash.keep ? http://api.rubyonrails.org/classes/ActionController/Flash/FlashHash.html#M000143 -- 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 -~----------~----~----~----~------~----~------~--~---
Adrian Liem wrote:> Joe Ruby MUDCRAP-CE wrote: >> I''m developing on Mac OS X and stuff I''m sticking in flash is sticking >> around for two requests. For example: >> >> /foo <- sets flash[:notice] >> /bar <- flash[:notice] is displayed on >> /baz <- flash[:notice] is also displayed on >> /fubar <- flash[:notice] is NOT displayed >> >> Any idea why flash is persisting for two requests? >> >> Thanks, >> Joe > > flash.keep ? > http://api.rubyonrails.org/classes/ActionController/Flash/FlashHash.html#M000143Hmm, don''t think so. Unless flash defaults to two actions or something -- I don''t see anything in /config. Joe -- 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 -~----------~----~----~----~------~----~------~--~---
On 10/9/06, Joe Ruby MUDCRAP-CE <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m developing on Mac OS X and stuff I''m sticking in flash is sticking > around for two requests. For example: > > /foo <- sets flash[:notice] > /bar <- flash[:notice] is displayed on > /baz <- flash[:notice] is also displayed on > /fubar <- flash[:notice] is NOT displayed > > Any idea why flash is persisting for two requests?Where/how do you set the flash? I know that setting the flash, and then redirecting, from a before_filter had this effect a while ago (haven''t tested recently). Think you''ll find a thread on rails-core about the issue. I think consenus was that this had to be a bug, but have no idea if it''s been fixed. Isak> Thanks, > Joe > > -- > 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 -~----------~----~----~----~------~----~------~--~---
On 10/10/06, Isak Hansen <isak.hansen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On 10/9/06, Joe Ruby MUDCRAP-CE <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > I''m developing on Mac OS X and stuff I''m sticking in flash is sticking > > around for two requests. For example: > > > > /foo <- sets flash[:notice] > > /bar <- flash[:notice] is displayed on > > /baz <- flash[:notice] is also displayed on > > /fubar <- flash[:notice] is NOT displayed > > > > Any idea why flash is persisting for two requests?Instead of using flash use flash.now[ :notice ] in the docs http://api.rubyonrails.org/classes/ActionController/Flash/FlashHash.html#M000142 it says Sets a flash that will not be available to the next action, only to the> current. ><snip>> This method enables you to use the flash as a central messaging system in > your app. When you need to pass an object to the next action, you use the > standard flash assign ([]=). When you need to pass an object to the > current action, you use now, and your object will vanish when the current > action is done. >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---