On 6 July 2010 11:33, Pale Horse <[email protected]> wrote: > The situation is: > > I have a Product table with data. I require a form. The form requires a > list of Products that have a text field opposite where the user can > specify a limitless amount of each product. The form will not relate to > a resource. It should send mail to a specified address with the > information of the order. > > I'm unsure about the syntax I should use in the form, mailer model and > mailer views. > > 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 -- 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.

