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.

Use `matches` instead of `eq` for arel query (#12749)

Damian Legawiecc1059cac69ad
diff --git a/core/app/models/spree/taxon.rb b/core/app/models/spree/taxon.rb
index 2b3a865b7c..6047bf5da3 100644
--- a/core/app/models/spree/taxon.rb
+++ b/core/app/models/spree/taxon.rb
@@ -96,10 +96,10 @@ module Spree
joins(:taxonomy).
join_translation_table(Taxonomy).
where(
- Taxonomy.arel_table_alias[:name].lower.eq(taxonomy_name.downcase.strip)
+ Taxonomy.arel_table_alias[:name].lower.matches(taxonomy_name.downcase.strip)
)
else
- joins(:taxonomy).where(Spree::Taxonomy.arel_table[:name].lower.eq(taxonomy_name.downcase.strip))
+ joins(:taxonomy).where(Spree::Taxonomy.arel_table[:name].lower.matches(taxonomy_name.downcase.strip))
end
}