Commit 76881578 by ivan Lan

Fix snapshot validation :check_spec_value to ignore ary order

parent 4e474b98
......@@ -185,6 +185,7 @@ module Shotengai
super
end
# beause relation :snapshots has many types, so do not use order.snapshot to create or init a obj
def can_buy *good_class_names
good_classes = good_class_names.map(&:constantize)
# 所有snapshot
......
......@@ -159,7 +159,7 @@ module Shotengai
# spec 字段
def check_spec_value
errors.add(:spec_value, 'spec 与 所给系列不符。') unless spec_value.nil? || spec_value.keys == shotengai_series.spec_value.keys
errors.add(:spec_value, 'spec 与 所给系列不符。') unless spec_value.nil? || spec_value.keys.sort == shotengai_series.spec_value.keys.sort
end
def remark_template_empty?
......
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