I have created few static pages with awesome high_voltage gem.
My pages are static, except a different form in each page.
Forms are supposed to grab user details and send emails (and may be save details in db)
Question:
How should I proceed with this ?
I am concerned more about rails approach,
e.g.
- How can I add validation without custom coding (both at client / server side)
- How can take help from rails helper method ?
Suppose, I would like to save those fields in db, how should I deal with that ?
In nutshell, I want to use as maximum of rails magic without manually dealing with things.
What I have tried ?
Currently, I have forms in each page. Each form posts at same controller (PagesController) with post
method.
I then differentiate them, based on hidden input on respective form.
I do not have any validations for now.