I have an input box which I want to handle two types of information, foo
and bar
.
The form action is set to either the foo
controller or 'bar
controller. It really doesn't matter which one. For the sake of example, the form action is to foo/new
.
In the controller, I have a function that looks at the form input text and determines if it is of type foo
or type bar
.
If `foo`, continue processing and saving the data in the foo controller.
If `bar`, I need to send it to the bar controller.
Is there some way to redirect to the new action of the bar controller while programmatically adding the original form value into the params hash. My goal is too keep the bar/new action intact.
Thanks