]> projects.mako.cc - selectricity-live/blobdiff - app/models/full_voter.rb
fixed up a series of things in prepration for the stress test on friday
[selectricity-live] / app / models / full_voter.rb
index b82667c3f926f6d82f61e3844010744cc2466fdf..68b3d077afa11ddbee911d42e529835856c92ed4 100644 (file)
@@ -1,7 +1,18 @@
+# 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 FullVoter < Voter
-  before_create :create_password
   validates_presence_of :email, :password
 
+  def initialize(params={})
+    super
+    create_password
+  end
+  
   def create_password
     token_generator = UniqueTokenGenerator.new( 16 )
     until password and not password.empty? \

Benjamin Mako Hill || Want to submit a patch?