I try do update the flash on my page with ajax.
I have this on my layout :
<%= render :partial => 'layouts/flash' %>
I have this on my ApplicationHelper :
page.replace "flash_messages", :partial => 'layouts/flash'
and I try do that on my controller :
render :update do |page|
flash[:notice] = "Entering 'beast mode'..."
but I have an error, to fix it i need to add a parameter page on my
function reload_flash and call this function with reload_flash(page)
instead of page.reload_flash, that's work but I think It's a bit
weird, I prefer write something without parameter.
Do you know how i can do that ?
In fact this code is from this page
and the author says he use it. Is it with available in an older
version of rails ?