2008年5月8日 星期四

flash

the value stored in the flash in the first request is available in the second request.
After processing 2nd request, the value is removed from flash

main use:
error message

ex:
def  test
    flash[:note] = "error"
    redirect_to :action=>test2
end

test2.html.erb
<%= @flash[:note] %>

沒有留言: