fixed licensing information for selectricity
[selectricity] / app / models / voter_notify.rb
1 # Selectricity: Voting Machinery for the Masses
2 # Copyright (C) 2007, 2008 Benjamin Mako Hill <mako@atdot.cc>
3 # Copyright (C) 2007 Massachusetts Institute of Technology
4 #
5 # This program is free software. Please see the COPYING file for
6 # details.
7
8 class VoterNotify < ActionMailer::Base
9
10   def votestart(voter)
11     @subject = "[%s] Election Begun!" % voter.election.name
12     @recipients = voter.email
13     @from = MAIL_CONFIG[:from]
14     @sent_on = Time.now
15     @body = { :voter => voter }
16   end
17
18   def reminder(voter_array)
19     @subject = "Selectricity Election Reminder!"
20     @recipients = voter_array[0].email
21     @from = MAIL_CONFIG[:from]
22     @sent_on = Time.now
23     @body = { :voter_array => voter_array }
24   end
25
26 end

Benjamin Mako Hill || Want to submit a patch?