boissier_app/app/helpers/admin/javascripts_helper.rb
Nicolas Bally 6abf7679fd initial
2011-05-14 13:36:30 +02:00

29 lines
516 B
Ruby

# -*- encoding : utf-8 -*-
module Admin::JavascriptsHelper
def flash_notice()
if flash[:notice]
text = flash[:notice]
flash[:notice] = nil
return raw('flash_notice("'+escape_javascript(text)+'");')
end
end
def flash_alert()
if flash[:alert]
text = flash[:alert]
flash[:alert] = nil
return raw('flash_alert("'+escape_javascript(text)+'");')
end
end
def flashs()
r= flash_notice().to_s
r+= flash_alert().to_s
return raw(r)
end
end