diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rb index 22e7ec113c2..1f269ab754e 100644 --- a/core/app/models/spree/store.rb +++ b/core/app/models/spree/store.rb @@ -22,6 +22,8 @@ class Store < Spree::Base validates :url, presence: true validates :mail_from_address, presence: true + self.allowed_ransackable_attributes = %w[name url code] + before_save :ensure_default_exists_and_is_unique before_destroy :validate_not_default