ruby-on-railsactionviewhobo

How do i create a form that inputs multiple items of a model?


I have a simple point of sale application written in ruby and rails, and hobo.

Originally intended to be for only one product at the time, now the client wants to add multiple products into the sale model

Besides that i am using brands for categorizing products and in my new sale form i use ajax in order to populate a select product method after selecting the brand in another select menu.

so what i want is to use my current system and just change my new sale form if possibly to add multiple products to a sale


Solution

  • i had to create a cart model as a container for products, then procced to use my sale with the cart, and from there further.. validations and stuff had to be reprogrammed