Rendering a different controller and action while keeping errors
Posted
by DerNalia
on Stack Overflow
See other posts from Stack Overflow
or by DerNalia
Published on 2010-06-09T19:29:36Z
Indexed on
2010/06/09
19:32 UTC
Read the original article
Hit count: 219
I have a form in one controller(A) that renders a partial from another controller(B), and stays on A's edit page during editing / updating etc.
However... When the partial form form controller B has an error, the error doesn't show up on A's edit page
right now, if there is an error, I am doing (in controller B's update method)
redirect_to :controller => "A", :action => "edit"
and then this is built in... but I don't know what to do with it... the error needs to be sent to controller A... but.. it doesn't
format.xml { render :xml => @varFromB.errors, :status => :unprocessable_entity }
thanks
© Stack Overflow or respective owner