Return true on default for product isValid
This commit is contained in:
@@ -20,4 +20,5 @@ App.Product = DS.Model.extend
|
||||
isValid: (->
|
||||
return false unless price = @get('price')
|
||||
return false unless "#{price}".match(/^[+-]?\d+(\.?\d?\d)?$/)
|
||||
true
|
||||
).property('price')
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module Suppliers
|
||||
class ProductCategoriesController < Suppliers::ApplicationController
|
||||
layout 'tablet'
|
||||
|
||||
# GET /product_categories
|
||||
# GET /product_categories.json
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module Suppliers
|
||||
class ProductsController < Suppliers::ApplicationController
|
||||
layout 'tablet'
|
||||
|
||||
# GET /products
|
||||
# GET /products.json
|
||||
|
||||
Reference in New Issue
Block a user