]> projects.mako.cc - selectricity-live/blobdiff - app/models/raw_voter_list.rb
Created a partial to DRY the aja voting method. Modified the voter class to
[selectricity-live] / app / models / raw_voter_list.rb
index 2f7cb28b1ae62f2ca6ec46c56d2fb8eecf07bbe5..508902cfc24a92121711ecfbd519ca7bcbb277a3 100644 (file)
@@ -6,7 +6,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 +16,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?