How to get the right form to retry for valid input

I have a situation where I have several different methods that put up
forms for the user that all update various parts of the same model.
They could all go through the same “update” method, with a structure
at the end like:

if at-variable.update_attributes(parms)
flash - it worked
render action => “The form that got us here”

however, its not obvious how to get back to the right form to re-try
for valid input. I could set a session variable or pass the form name
in a hidden field, but that seems kind of clunky. And setting up
matching Form1 - Update1, Form2 - Update2, etc. sets of methods seems
very non-DRY when the only difference between the updates is the
final render action. Is there a normal “railsy” way of setting this up?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs