From 8a80f30134cb6482201e22e906422e85f51d4d83 Mon Sep 17 00:00:00 2001 From: Kevin Chen Date: Sun, 25 May 2014 09:35:45 -0500 Subject: [PATCH] mapping to new color name of Bootstrap 3 --- lib/bootstrap_helper/helper.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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