In one of my create action in the controller, I am catching a error
and trying to show errors on the same page. It was all good when I
called render action => ‘new’. However, I also wanted to append a
query string for consistence purposes. How do I do that with render?
For now, I can only call redirect_to and put the error in the flash
variable which doesn’t seems to be as clean of a solution.
In one of my create action in the controller, I am catching a error
and trying to show errors on the same page. It was all good when I
called render action => ‘new’. However, I also wanted to append a
query string for consistence purposes. How do I do that with render?
For now, I can only call redirect_to and put the error in the flash
variable which doesn’t seems to be as clean of a solution.
render just renders a template - you can’t change the query string
(without redirecting) because the browser shows the url it accessed.
You could change your form to a get form if you wanted to (although
that would put all the form parameters in the url)