rubyforgood / pdx_diaper

Inventory system for Portland Diaper Bank, created at Ruby For Good 2016
MIT License
6 stars 3 forks source link

Fixes #43 by validating ticket containers #57

Closed cattywampus closed 8 years ago

cattywampus commented 8 years ago

This particular bug would try to generate an error message using the item name of a container, however in this case the user never selected an item on the form so we were calling #name on nil. This ensures that contaners on a ticket are valid by checking for both the item and quantity

Also found a 2nd bug where #distribute! would get called on inventory, even if the user never selected an inventory on the form.