lib/laboratory/experiment/variant.rb in laboratory-0.1.1 vs lib/laboratory/experiment/variant.rb in laboratory-0.1.2
- old
+ new
@@ -24,10 +24,14 @@
end
def changeset
set = {}
set[:id] = [_original_id, id] if _original_id != id
- set[:percentage] = [_original_percentage, percentage] if _original_percentage != percentage
+
+ if _original_percentage != percentage
+ set[:percentage] = [_original_percentage, percentage]
+ end
+
set
end
end
end
end