4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/rules_engine_view/alerts.rb', line 4
def re_alert
result = '<div id="re_alert">'.html_safe
unless flash[:error].blank?
result << '<div class="error"><strong>Error : </strong><span>'.html_safe
result << flash.delete(:error)
result << '</span><a class="re-alert-close" href="#">Close</a></div>'.html_safe
flash.delete(:success)
flash.delete(:notice)
end
unless flash[:success].blank?
result << '<div class="success"><strong>Success : </strong><span>'.html_safe
result << flash.delete(:success)
result << '</span><a class="re-alert-close" href="#">Close</a></div>'.html_safe
flash.delete(:notice)
end
unless flash[:notice].blank?
result << '<div class="notice"><strong>Warning : </strong><span>'.html_safe
result << flash.delete(:notice)
result << '</span><a class="re-alert-close" href="#">Close</a></div>'.html_safe
end
result << '</div>'.html_safe
return result
end
|