seyhunak/twitter-bootstrap-rails — pull request #510 by trusche (2013-02-07 10:13:13+00:00)
Title: Skip blank flash messages

Hi,

sometimes, to avoid an unwanted flash message, it can be necessary to set it to the empty string, instead of simply not setting it in the first place. A good example would be the standard Devise message "You must be logged in...", which I've always found redundant. It's easy to set this to empty in the locale file:

devise:
failure:
already_authenticated: 'You are already signed in.'
unauthenticated: '' # don't display this
unconfirmed: 'You have to confirm your account before continuing.'

These empty messages should be skipped completely - displaying the flash div without any message makes little sense.

Thanks!