cannot access flash from rjs helper

all is in the title :). I've got an rjs file calling
This method is defined in Application helper in which i do this :
if flash.size > 0
  flash.each do |key, msg|
    page.insert_html(:bottom, :alert, content_tag(:div, msg, :class =>

But the flash content is lost.
When i put the code directly in the rjs file it works.

Someone can help?