My product table is
id type price location
1 chips $3 aisle3
I have a question with adding the products in groups.
There is a quantity field(nonmodel) where the user can enter the
While adding a new product if the user enters:
Then 3 records should be created in product model with type= soda like
If user enters
Can you tell me how to pass the nonmodel field ‘quantity’ to the
rails(model or controller) and how use it to add the products in
groups as mentioned above? or should I create a column called quantity
in my product table? Will the history be updated too for all these new
records with after_create filter which I already have created?
Is there any good tutorial or book which shows how to pass such nonmodel
Any help will be greatly appreciated.