summaryrefslogtreecommitdiff
path: root/lib/sampling/manual.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sampling/manual.rb')
-rw-r--r--lib/sampling/manual.rb5
1 files changed, 4 insertions, 1 deletions
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