Application error


I am currently working with a form. Here is my error handling code.

if !
  flash[:notice] = "error... blah blah blah"
  render :action => "index"

When ever I use this render call I keep getting the following...

Application error

Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html

Not all time time but sometimes. Has it got somehting to do with the
"render" call? I noticed it started when i changed that form a
"redirect_to" to a "render" so i could display my form error details.