Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
bold flash[:notice]
11 Posts
bold flash[:notice]

I agree with Chris and Marcin - but tend to take it further. I set up a shared template for flashes under shared/_flash.rhtml Then you can add appropriate styling for each flash type - if there's one present. Generally something along the lines of Marcin's example thus:


Then add the following to your stylesheet:

 .flash {
   font-weight: bold;
   padding: 5px;
   margin-bottom: 5px;
.error {
   background-color: #FAA;
   border: solid 2px red;
 .warning {
   background-color: #FFA;
   border: solid 2px yellow;
 .notice {
   background-color: #AFA;
   border: solid 2px green;
11 Posts
Login to add your message