<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: warning code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Wed, 14 May 2008 02:43:31 GMT</pubDate>
    <description>DZone Snippets: warning code</description>
    <item>
      <title>Rails Notice/Warning Flash Message</title>
      <link>http://snippets.dzone.com/posts/show/5271</link>
      <description>Somewhat lame, but handy nonetheless.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;% if flash[:warning] or flash[:notice] %&gt;&lt;br /&gt;  &lt;div id="notice" &lt;% if flash[:warning] %&gt;class="warning"&lt;% end %&gt;&gt;&lt;br /&gt;    &lt;%= flash[:warning] || flash[:notice] %&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;  &lt;script type="text/javascript"&gt;&lt;br /&gt;    setTimeout("new Effect.Fade('notice');", 15000)&lt;br /&gt;  &lt;/script&gt;&lt;br /&gt;&lt;% end %&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 23 Mar 2008 00:01:03 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5271</guid>
      <author>timmorgan (Tim Morgan)</author>
    </item>
  </channel>
</rss>
