Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

got rid of ransack configuration for promotion.rb

Mateusz Porębski03079f4787c1
diff --git a/core/app/models/spree/promotion.rb b/core/app/models/spree/promotion.rb
index c83ae3114b..f93b834bc1 100644
--- a/core/app/models/spree/promotion.rb
+++ b/core/app/models/spree/promotion.rb
@@ -56,9 +56,6 @@ module Spree
self.whitelisted_ransackable_attributes = ['path', 'promotion_category_id', 'promotion_batch_id', 'code']
self.whitelisted_ransackable_scopes = ['for_template_promotion_id']
- def self.ransackable_scopes_skip_sanitize_args
- [:for_template_promotion_id]
- end
def self.with_coupon_code(coupon_code)
where("lower(#{table_name}.code) = ?", coupon_code.strip.downcase).