8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/spurs/flash/builder.rb', line 8
def build_alert(message,my_options)
if message == nil
raise "No message! #{my_options.to_json}"
end
my_content = String.new
if my_options[:close_button]
my_content.concat(content_tag(:a, "×".html_safe, :class => :close, 'data-dismiss' => :alert))
end
= my_options[:title]
if my_options[:title_icon]
= content_tag(:img, nil, :src => "/assets/#{my_options[:title_icon]}", :style => "margin-bottom: 2px; margin-right: 5px; float: left").concat()
end
my_content.concat(())
my_content.concat(content_tag(:p, message.to_s.html_safe))
alert_tag(my_content.html_safe, my_options)
end
|