7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/slide-down-alerts-rails/view_helpers.rb', line 7
def slide_down_alerts
if flash[:notice] || flash[:alert] || flash[:error]
if flash[:error]
render :partial => "slide_down_alerts_rails/script_partial", :locals => { :method => "Error", :message => flash[:error] }
elsif flash[:notice]
render :partial => "slide_down_alerts_rails/script_partial", :locals => { :method => "Notification", :message => flash[:notice] }
elsif flash[:alert]
render :partial => "slide_down_alerts_rails/script_partial", :locals => { :method => "Warning", :message => flash[:alert] }
end
end
end
|