Better menu product editing for supplier

This commit is contained in:
2014-11-28 15:37:52 +01:00
parent 3c5e9e7441
commit 22c8e27aa7
6 changed files with 33 additions and 8 deletions
@@ -16,3 +16,8 @@ App.Product = DS.Model.extend
return image.small if image.small and typeof(image.small) is "string"
image
).property('image')
isValid: (->
return false unless price = @get('price')
return false unless "#{price}".match(/^[+-]?\d+(\.?\d?\d)?$/)
).property('price')