Hi, I would like to use flash[:notice] to display coach content, e.g. "It''s generally a bad idea to do [whatever you just did]. Click here to find out why" - which goes to a more complete coaching page on that topic. My questions are: 1) Does anyone know of nice snippets for doing that (e.g. script.aculo.usfade in, fade out), and 2) It seems the (very plain) approach I''m taking doesn''t show up until the page is reloaded. How can I make it show up right when I call it (from controller: flash[:notice] = "It''s generally a bad idea..." Thanks in advance, Marc --~--~---------~--~----~------------~-------~--~----~ 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 think flash[:now] will do what you need. -- 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 8/30/07, Marc Byrd <dr.marc.byrd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I would like to use flash[:notice] to display coach content, e.g. "It''s > generally a bad idea to do [whatever you just did]. Click here to find out > why" - which goes to a more complete coaching page on that topic. > > My questions are: > 1) Does anyone know of nice snippets for doing that (e.g. script.aculo.us > fade in, fade out), andthis is pretty easy to do with an ajax callback. Just use the visual_effect method on the div that contains your flash message in your ajax method.> 2) It seems the (very plain) approach I''m taking doesn''t show up until the > page is reloaded. How can I make it show up right when I call it (from > controller: flash[:notice] = "It''s generally a bad idea..."if you want to show a message immediately (without a complete page reload), you''ll need to use an ajax callback. Adam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---