lib/vanity/experiment/ab_test.rb in vanity-2.0.0.beta5 vs lib/vanity/experiment/ab_test.rb in vanity-2.0.0.beta6

- old
+ new

@@ -443,9 +443,17 @@ def destroy connection.destroy_experiment @id super end + + # clears all collected data for the experiment + def reset + connection.destroy_experiment @id + connection.set_experiment_created_at @id, Time.now + @outcome = @completed_at = nil + self + end def save true_false unless @alternatives fail "Experiment #{name} needs at least two alternatives" unless @alternatives.size >= 2 super