X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/22a46a7e2d408fa64e55abd839e6b448f73ed760..15870a550ddd18192efc71c1355a238e7c7c53e8:/app/models/full_voter.rb diff --git a/app/models/full_voter.rb b/app/models/full_voter.rb index b82667c..68b3d07 100644 --- a/app/models/full_voter.rb +++ b/app/models/full_voter.rb @@ -1,7 +1,18 @@ +# Selectricity: Voting Machinery for the Masses +# Copyright (C) 2007, 2008 Benjamin Mako Hill +# 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? \