From ffb0291c9c50a562439029625dac8b50e8583085 Mon Sep 17 00:00:00 2001 From: shimada Date: Wed, 5 Jun 2013 07:18:57 +0900 Subject: [PATCH] =?utf8?q?refs=20#727=20products.price=20=E3=81=AB?= =?utf8?q?=E3=83=9E=E3=82=A4=E3=83=8A=E3=82=B9=E3=81=8C=E5=85=A5=E3=82=89?= =?utf8?q?=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/models/product.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/product.rb b/app/models/product.rb index b7615a0..0cbb36a 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -38,7 +38,7 @@ class Product < ActiveRecord::Base validates_presence_of :supplier validates_presence_of :retailer validates_associated :sub_products - + validates_numericality_of :price, :allow_nil => true, :greater_than_or_equal_to => 0 attr_accessor :small_resource_path attr_accessor :medium_resource_path attr_accessor :large_resource_path -- 2.11.0