summaryrefslogtreecommitdiff
path: root/lib/sampling/manual.rb
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-28 21:21:47 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-28 21:21:47 -0400
commit8db5113a761d443374a64e5e9fe877fafa3f0a50 (patch)
tree2ee26da4aee9926d44c9fe7faaa3d5705a4a16fc /lib/sampling/manual.rb
parentfeffb3b186ad2b73bd9868a1eb24ab20f9c71507 (diff)
Fixed status 2-3 transition and statistic sampling.
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