RE: Validation errors not displaying and will not save


#1

Hello Decio,
It appears as though you are redirecting at the end of the “image_save”
action. This would be your problem. A redirect causes the browser to
reissue a call for the page to which you are being redirected. This
will in effect call the image_upload method and then render the
corresponding rhtml page, thus losing any state information you had on
the call to image_save. To fix this, simply replace “redirect_to
:action => ‘image_upload’” render :action => “image_upload”. Which will
call the image_upload action after handling the image_save, BUT without
leaving the context of a single http request.
Matt