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.

Whitelist iso/iso3/iso_name on Spree::Country for ransack

Damian Legawiec38531d180d16
diff --git a/spree/core/app/models/spree/country.rb b/spree/core/app/models/spree/country.rb
index 90d9ec77a3..954f465f68 100644
--- a/spree/core/app/models/spree/country.rb
+++ b/spree/core/app/models/spree/country.rb
@@ -1,5 +1,7 @@
module Spree
class Country < Spree.base_class
+ self.whitelisted_ransackable_attributes = %w[iso iso3 iso_name]
+
has_many :addresses, dependent: :restrict_with_error
has_many :states,
-> { order name: :asc },