mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +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