WIP: Remove changes to variant bulk show casuing issues

This commit is contained in:
Rob H
2014-03-28 14:41:03 +11:00
parent 771ccc6e76
commit ee147c232e

View File

@@ -1,7 +1,6 @@
object @variant
attributes :id, :options_text, :unit_value, :unit_description, :on_demand
attributes :id, :price, :options_text, :unit_value, :unit_description, :on_demand
# Infinity is not a valid JSON object, but Rails encodes it anyway
node( :on_hand ) { |v| v.on_hand.nil? ? 0 : v.on_hand.to_f.finite? ? v.on_hand : "On demand" }
node( :price ) { |v| v.price.nil? ? '0.0' : v.price }
node( :on_hand ) { |v| v.on_hand.to_f.finite? ? v.on_hand : "On demand" }