
Originally Posted by
skeeterbug
You can put multiple forms in the same view, then just have their actions point to different controllers. For example, if you had a form to add users and add products on the same page, the user form would submit to a URL like /users/new and the product form would submit to /products/new. From there, you can then redirect back to your "master" page.
based on this, it seems like you are suggesting having all the form elements on one page, each with its own submit button. based on the button pressed, it would submit to the correct method. i wasn't too clear, but this won't work. i oversimplified the reality - some forms have multiple elements and i actually have a few more pages than 3. more like 6.
here's what i'm thinking.
1 controller for app maintenance functions (there will be controllers for other functions, too).
2. i would create a method for each display page and use the layout, inject form form element code method to display the forms.
3. i somehow need to work with the model to get it to do the db work once the form is submitted. i have to review some code to see how this is done.
does this seem reasonable? is it consistent with the RoR way?
can anyone toss out some hints how to handle the model(s) portion of this way of doing things?
tia...
Bookmarks