On 6 July 2010 12:00, Pale Horse <[email protected]> wrote: > Colin Law wrote: >> On 6 July 2010 11:33, Pale Horse <[email protected]> wrote: >>> >>> I need some assistance to get this working. I'm sure you can help, >>> whether it be directly or providing me with some documentation on this >>> particular topic. >> >> Start with the simplest bit and work up. Since you are not editing a >> resource then use form_tag rather then form_for. Google and look at >> the docs for how to use it (you will find many examples). Once you >> have got a form to display then work out how to get the list of >> products on it. Then work out how to get in the input fields, and so >> on. Come back with questions when you get stuck. >> >> Use a code control system such as git to manage your code so you can >> easily experiment and go back to previous versions if you find >> yourself up a blind alley. >> >> Write tests as you go so that you know that the code works. >> >> I presume you have worked through a number of tutorials on basic RoR >> functionality, testing and so on. Even if they do not seem to be >> directly applicable to your requirement you will learn a lot by doing >> this. >> >> Colin > > Your input is appreciated, Colin. > > I've got a basic form that generates a list of Products from the > database with a quantity field for each. The problem I have is > collecting this data to send. I'm not sure how the syntax for the form > and mailer models and views for this in particular, would appear.
You seem to have snipped the original question so I have had to go back to your initial email to see it, it is better not to snip so much that the basic problem is lost. You say you already have the form showing the list of products and quantities. When you submit that form then the contents of the fields will be passed in params[]. In the controller you can then pick up the quantities. I am not sure exactly what you are having difficulties with. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

