Forum: Ruby on Rails RE: Validation errors not displaying and will not save

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Matt G. (Guest)
on 2006-01-03 20:00
(Received via mailing list)
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
This topic is locked and can not be replied to.