I have a validation that needs to be done in controller. If it fails I need to go back to the view action back again with all values populated as it is on the page.
Is there a simple way to do that (using incoming params map).
I have a validation that needs to be done in controller. If it fails
Share
This is the basic way all Rails controllers and scaffolds work. Perhaps you should try generating scaffolds?
I populate a
@banner_adhere, attempt to save it, if it fails, I return to the form and the @banner_ad object is available to me. I then need to have a form that uses the Rails form helpers to populate the values from the object.