i18n_rails_helpers 1.4.7 → 1.4.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -55,6 +55,18 @@ module BootstrapHelper
55
55
 
56
56
  # Messages
57
57
  # ========
58
+ # Map common rails flash types to bootstrap alert names.
59
+ def boot_alert_name(type)
60
+ case type
61
+ when 'alert'
62
+ 'danger'
63
+ when 'notice'
64
+ 'info'
65
+ else
66
+ type
67
+ end
68
+ end
69
+
58
70
  def boot_alert(*args, &block)
59
71
  if block_given?
60
72
  type = args[0]
@@ -65,7 +77,7 @@ module BootstrapHelper
65
77
  end
66
78
 
67
79
  type ||= 'info'
68
- content_tag(:div, :class => "alert alert-block alert-#{type} fade in") do
80
+ content_tag(:div, :class => "alert alert-#{boot_alert_name(type)}") do
69
81
  link_to('×'.html_safe, '#', :class => 'close', 'data-dismiss' => 'alert') + content
70
82
  end
71
83
  end
@@ -1,3 +1,3 @@
1
1
  module I18nRailsHelpers
2
- VERSION = "1.4.7"
2
+ VERSION = "1.4.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_rails_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.7
4
+ version: 1.4.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: