Commit 1bf6c345 by ivan Lan

Fix syntax error

parent 94f8a98f
......@@ -55,7 +55,7 @@ module Shotengai
# where("spec->'$.\"颜色\"' = ? and spec->'$.\"大小\"' = ?" ,红色,S)
scope :query_spec_value_with_product, ->(val, product, eql=true) {
if val.keys.sort == product.spec_template.keys.sort || (!.eql && (val.keys - product.spec_template.keys).empty?)
if val.keys.sort == product.spec_template.keys.sort || (eql.! && (val.keys - product.spec_template.keys).empty?)
keys = []; values = [];
proc = Proc.new { |k, v| keys << "spec_value->'$.\"#{k}\"' = ? "; values << v }
Shotengai::Harray === val ? val.hash_map(&proc) : val.map(&proc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment