aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'site/app/models/participation.rb')
-rw-r--r--site/app/models/participation.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/site/app/models/participation.rb b/site/app/models/participation.rb
index 95c4142..b7ca39a 100644
--- a/site/app/models/participation.rb
+++ b/site/app/models/participation.rb
@@ -31,4 +31,16 @@ class Participation < ActiveRecord::Base
def name
participant.name
end
+
+ def self.mark_participations(results)
+ participant_nicks = results.values.*.keys.flatten.uniq
+ agenda = Agenda.current
+ for nick in participant_nicks
+ user = ::User.find_by_irc_nick(nick)
+ next if user.nil?
+ Participation.create! :irc_nick => user.irc_nick,
+ :participant => user,
+ :agenda => agenda
+ end
+ end
end