Open sbidoul opened 5 years ago
Hi,
It seems that with_scope keys containing an operator do not work with ruby 2.6.
with_scope
As an example, the following syntax change makes them work again:
- {% with_scope price.gt: {default: {discount: 0}}, "functions.in" => {id: product_functions } %} + {% with_scope "price.gt" => {default: {discount: 0}}, "functions.in" => {id: product_functions } %}
The symptom is that in places such as https://github.com/shopinvader/locomotive-shopinvader/blob/cef298fbce6cbaa29ae18f8d0f87a4a6491fb49d/lib/shop_invader/services/elastic_service.rb#L139
keys has value "t" instead of the value the developer intended (such as function.in).
keys
"t"
function.in
I'm not sure if this issue arises in locomotive-shopinvader or upstream in locomotive.
cc/ @lmignon
@sebastienbeau @rvalyi do you have any opinion on this issue?
Hi,
It seems that
with_scope
keys containing an operator do not work with ruby 2.6.As an example, the following syntax change makes them work again:
The symptom is that in places such as https://github.com/shopinvader/locomotive-shopinvader/blob/cef298fbce6cbaa29ae18f8d0f87a4a6491fb49d/lib/shop_invader/services/elastic_service.rb#L139
keys
has value"t"
instead of the value the developer intended (such asfunction.in
).I'm not sure if this issue arises in locomotive-shopinvader or upstream in locomotive.