styling fixes and fix for supplier deleted products...

This commit is contained in:
2012-12-11 15:39:40 +01:00
parent 627174d493
commit 754806b61f
6 changed files with 22 additions and 11 deletions
+5
View File
@@ -10,4 +10,9 @@ class ProductOrder
view :by_product_id, key: :product_id
view :by_order_id, key: :order_id
# Getter for product name. If a supplier deletes a product, that has product_orders, the product
# will become nil. This method should handle this case.
def product_name
product.try(:name) || '[deleted]'
end
end