From c4e50dbb134ef9f9a1869aa9cf063859f6868cac Mon Sep 17 00:00:00 2001 From: Rob H Date: Wed, 23 Jul 2014 15:46:17 +1000 Subject: [PATCH] Change error message for blank Product Category --- app/models/spree/product_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/spree/product_decorator.rb b/app/models/spree/product_decorator.rb index 5894e46cc2..4faa54a06d 100644 --- a/app/models/spree/product_decorator.rb +++ b/app/models/spree/product_decorator.rb @@ -18,7 +18,7 @@ Spree::Product.class_eval do attr_accessible :variant_unit, :variant_unit_scale, :variant_unit_name, :unit_value, :unit_description, :notes, :images_attributes, :display_as validates_presence_of :supplier - validates_presence_of :primary_taxon + validates :primary_taxon, presence: { message: "^Product Category can't be blank" } validates_presence_of :variant_unit, if: :has_variants? validates_presence_of :variant_unit_scale,