14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'app/helpers/flash_block_helper.rb', line 14
def bs_alert(type, message, options={})
alert_options = options.dup
alert_options[:class] = parse_html_classes_to_arr alert_options[:class]
alert_options[:class] << 'alert'
alert_options[:class] << 'alert-dismissable'
alert_options[:class] << alert_class(type)
content = []
content << content_tag(:button, '×'.html_safe, class: 'close', type: 'button', data: {dismiss: :alert}, aria: {hidden: 'true'})
content << message
content_tag :div, content.join("\n").html_safe, alert_options
end
|