katharinechen/sims — pull request #6 by jaspeers (2014-11-30 00:02:39+00:00)
Title: Initial interface

Overview:
- Moved stuff in Items to a new Inventory model (par/stock levels).
- Inventory index displays a wicegrid table that looks like our week 1 sketch
- price stuff, I think this should end up in a Purchases table, haven't thought it out much (purchase has_many items...)

Would like to make the (par - stock) column sortable, but not sure how. The difference is returned by a method, and it seems like wice-grid only lets you sort by DB columns:

> It is important to remember that :attribute is the name of the database column, not a model attribute. Of course, all database columns have corresponding model attributes, but not all model attributes map to columns in the same table with the same name.

Maybe you can figure the above out?

Interface still can't:
- create items
- delete items
- add items to inventory

It just shows a list of inventory/items generated by seeds.rb

I think we can implement the interface stuff listed above on this branch and then move on to a new one?