From 8db5113a761d443374a64e5e9fe877fafa3f0a50 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 28 Apr 2014 21:21:47 -0400 Subject: Fixed status 2-3 transition and statistic sampling. --- lib/sampling/manual.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/sampling/manual.rb') diff --git a/lib/sampling/manual.rb b/lib/sampling/manual.rb index 4e86925..01f6835 100644 --- a/lib/sampling/manual.rb +++ b/lib/sampling/manual.rb @@ -44,7 +44,10 @@ module Sampling end def handle_user_interaction(user, sampling_params) - # TODO + # => Save sampling_params as statistics + sampling_params.select {|name, value| @match.stats_from(self.class).include? name }.each do |name, value| + Statistic.create(name: value, user: user, match: @match) + end end end end -- cgit v1.2.3-54-g00ecf