merged in from code from the other master
[selectricity] / app / models / raw_voter_list.rb
index 2f7cb28b1ae62f2ca6ec46c56d2fb8eecf07bbe5..64530d72b131f684c37205a3abe32cef4453ede1 100644 (file)
@@ -1,3 +1,10 @@
+# Selectricity: Voting Machinery for the Masses
+# Copyright (C) 2007, 2008 Benjamin Mako Hill <mako@atdot.cc>
+# Copyright (C) 2007 Massachusetts Institute of Technology
+#
+# This program is free software. Please see the COPYING file for
+# details.
+
 class RawVoterList
 
   attr_accessor :email
@@ -6,7 +13,7 @@ class RawVoterList
   include Enumerable
 
   def initialize(params={})
-    @email = params[:email] || 1
+    @email = params[:email].to_i || 1
     @input_addresses = params[:input_addresses] || String.new
   end
 
@@ -16,7 +23,7 @@ class RawVoterList
   
   def each
     @input_addresses.split("\n").each do |address|
-      yield Voter.new( { :email => address } ) 
+      yield FullVoter.new( { :email => address } ) 
     end
   end
 end

Benjamin Mako Hill || Want to submit a patch?