End of day commit

This commit is contained in:
2015-02-16 17:53:01 +01:00
parent 5eb3d15638
commit f7d8c4cc7c
27 changed files with 190 additions and 13 deletions
@@ -0,0 +1,8 @@
attr = DS.attr
App.Employee= DS.Model.extend Ember.Validations.Mixin,
name: attr 'string'
email: attr 'string'
validations:
name:
presence: true
@@ -17,7 +17,7 @@ App.Product = DS.Model.extend
image
).property('image')
isValid: (->
isValid: (->
return false unless price = @get('price')
return false unless "#{price}".match(/^[+-]?\d+(\.?\d?\d)?$/)
true