I have a scenario. Ignore this if it is silly. I have a form like a data entry. It has 3 fields which are name, age and gender. The guy who enters the data adds more fields with the help of an Add another Entry link which brings a set of the 3 fields with the help of a partial which has the form with 3 fields. After he finishes all the entries he Submits which must generate an XML file which will be saved in the file system. My question is how to pass the set of entered data to create the XML. XML can be built using XML builder function and file can be saved. But i need to know how this data can be passed to the controller for XML generation. Please help. Thank you -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The XML would be for example <students> <student name="Mark" age="25" gender="Male"/> <student name="Sarah" age="25" gender="Female"/> <students/> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Why don''t you just save the data to the database and serve it as xml when the xml is needed? This way you can do more than just xml with the data? If that''s not an option you can setup a session model that can store the data when it comes back to the controller... Just setup form_tags that has student_1 student_2 ... and save the data one by one... I''m thinking student_form has_many students and just use the database... --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---