Flash Errors

I have a form and a model with some validation.
/event/new/

When I just click an empty form (or fill in a few fields) I do get my
validation error no problem.
However, if I click the link at the top of the page that just takes me
to the same
/event/new
page without any post etc,
The Flash error still displays in my layout.

This is what I have code wise

  <% unless flash[:error].blank? -%>
    <div class="flash_error"><%= flash[:error] %></div>
    <div class="clear">&nbsp;</div>
  <% end -%>

Thanks in advance.

On 7/17/07, bradigan [email protected] wrote:

The Flash error still displays in my layout.
Hi Brad,

I think the controller code would be more relevant here.

Storing stuff in the flash means it’ll be there for the next request.
You probably only want to store stuff there if you respond with a
redirect. Perhaps you’re storing your errors in flash, and just doing
a render instead?

Regards,
George.