KatarzynaT-B/jedzeniowo — pull request #1 by tomash (2014-01-20 13:49:03+00:00)
Title: numbered param names in new dish form...

...to allow multiple ingredients in one form.

Nothing special about it, adding another [] component to input name gives us yet another level of depth.
The only smart part is using the same new [] key, with number, so that we can use the same key for product names when iterating over ingredient quantities.

Next level: make all the ingredient form elements within ingredient name space, that'll require select element to pass product_id instead of product name. Like:
```
input name="ingredient[1][quantity_per_dish]"
select name="ingredient[1][product_id]"
```

This will allow to build ingredients with one-line `@dish.ingredients.create(params[:ingredient][:1])`