I am new to web development (I do have several years of experience in server side). I need to create a page where one enters order information. For example: Item Name, Quantity, Price Then one can click an "Add" button and another line of input will appear and the user can fill that. In the end the user clicks "Submit" and the order is processed.
Now I know how to make a winforms application that does that, but I am new to rails, and in general to web development, could someone please point me to the right technology/package?
Perhaps someone has a link to a relevant tutorial? (I have done most of the rails tutorial but did not see anything like that there)
Thank you!
You want dynamic nested model forms.
Here is a gem that makes it work out of the box
Note: you will need to use jquery or prototype javascript frameworks.
One of the most common gotchas:
Make sure the parent model has attr_accessible :children_attributes.
Example: School has_many :students, you would need attr_accessible :students_attributes in your School model
You can read up on this and more at RailsAPI page for accepts_nested_attributes_for