summaryrefslogtreecommitdiff
path: root/lib/sampling/manual.rb
diff options
context:
space:
mode:
authortkimia <tkimia@purdue.edu>2014-04-28 22:01:14 -0400
committertkimia <tkimia@purdue.edu>2014-04-28 22:01:14 -0400
commitdd4c9e16c529bdbf0d055b279ed2dadc0c2aae13 (patch)
treeb0c9377df1f11ae626e5bd7057de158301884e0d /lib/sampling/manual.rb
parentbc8be5e217279012cd4dc62e3fc2fe2bd9308b1c (diff)
parentd52ceaf8d2b823b68edcf3614999b8639a0971f9 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
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