module RailsHelpers::Helpers::Bootstrap
Constants
- DEVISE_TO_BOOTSTRAP_DIV_CLASS
Public Instance Methods
flash_messages()
click to toggle source
# File lib/rails_helpers/helpers/bootstrap.rb, line 10 def flash_messages buffer = '' flash.each do |name, msg| the_class = DEVISE_TO_BOOTSTRAP_DIV_CLASS[name.to_sym] || name buffer << content_tag(:div, class: ['alert', "alert-#{the_class}"]) do msg end end buffer.html_safe end