From 26f2b58b05237a3e9b5addf3331e9c80a2001fca Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Mon, 21 Oct 2013 15:38:07 +1100 Subject: [PATCH] Allow blank paths for Promotions --- core/app/models/spree/promotion.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/app/models/spree/promotion.rb b/core/app/models/spree/promotion.rb index c33fa9fee08..165d3dfd721 100644 --- a/core/app/models/spree/promotion.rb +++ b/core/app/models/spree/promotion.rb @@ -14,7 +14,7 @@ class Promotion < ActiveRecord::Base validates_associated :rules validates :name, presence: true - validates :path, uniqueness: true + validates :path, uniqueness: true, allow_blank: true validates :usage_limit, numericality: { greater_than: 0, allow_nil: true } validates :description, length: { maximum: 255 }