diff --git a/lib/bootstrap_helper/helper.rb b/lib/bootstrap_helper/helper.rb index 15fb2c4..460c870 100644 --- a/lib/bootstrap_helper/helper.rb +++ b/lib/bootstrap_helper/helper.rb @@ -30,7 +30,14 @@ def render_body_tag def notice_message flash_messages = [] flash.each do |type, message| - type = :success if type == :notice + case type # mapping to new color name of Bootstrap 3 + when :error + type = :danger + when :alert + type = :warning + when :notice + type = :info + end text = content_tag(:div, link_to("x", "#", :class => "close", "data-dismiss" => "alert") + message, :class => "alert fade in alert-#{type}") flash_messages << text if message end