Just started going through the rails in four days tutorial (after major set-up / install issues..) and it''s telling me about this flash feature, which lets you "flash" a message to the user which then fades away (have definately seen this on 37 sigs products) only thing is, mine ain''t flashing... they just stay there... i''m guessing the flash come from the effects / prototype librarys right? do i have to include them in my layout.rhtml or do i have to do something else? just curious is all... -- Posted via http://www.ruby-forum.com/.
The flash feature is used for passing short-lived data between two action calls. What you''re describing is the fade effect javascript in the included effects.js file. flash method: http://api.rubyonrails.com/classes/ActionController/Flash.html#M000113 Fade effect: http://wiki.script.aculo.us/scriptaculous/show/Effect.Fade "craigtmackenzie" <craigtmackenzie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote in message news:3d6c7538b39d64a03880e2364cecbb1a-fsXkhYbjdPvAG73buMG3tuG/Ez6ZCGd0@public.gmane.org> Just started going through the rails in four days tutorial (after major > set-up / install issues..) and it''s telling me about this flash feature, > which lets you "flash" a message to the user which then fades away (have > definately seen this on 37 sigs products) only thing is, mine ain''t > flashing... they just stay there... i''m guessing the flash come from the > effects / prototype librarys right? do i have to include them in my > layout.rhtml or do i have to do something else? just curious is all... > > -- > Posted via http://www.ruby-forum.com/.
The flash stays in the session until the next request. If you set flash and you do not redirect_to, you will see it stay. In this case you should use flash.now[:message] Kent. On Monday 05 December 2005 18:52, craigtmackenzie wrote:> Just started going through the rails in four days tutorial (after major > set-up / install issues..) and it''s telling me about this flash feature, > which lets you "flash" a message to the user which then fades away (have > definately seen this on 37 sigs products) only thing is, mine ain''t > flashing... they just stay there... i''m guessing the flash come from the > effects / prototype librarys right? do i have to include them in my > layout.rhtml or do i have to do something else? just curious is all...
oh ok i think i get it, so flash is like a way of sendng messages between "states" like an edit then return to list ???? How would i ajax-ify this behaviour then, or is that a ruby on rails no no (i''m still fairly new to ror) -- Posted via http://www.ruby-forum.com/.