mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Circunvent security contraint on rails 61
This commit is contained in:
@@ -77,6 +77,6 @@ class TaxRateFinder
|
||||
approximation = (included_tax / (amount - included_tax))
|
||||
return [] if approximation.infinite? || approximation.zero? || approximation.nan?
|
||||
|
||||
[Spree::TaxRate.order("ABS(amount - #{approximation})").first]
|
||||
[Spree::TaxRate.order(Arel.sql("ABS(amount - #{approximation})")).first]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user