X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/22a46a7e2d408fa64e55abd839e6b448f73ed760..3e0d5a9b6af9ec1283b0c0e8cfae6cca9c2bea3a:/app/models/full_voter.rb diff --git a/app/models/full_voter.rb b/app/models/full_voter.rb index b82667c..9e5709e 100644 --- a/app/models/full_voter.rb +++ b/app/models/full_voter.rb @@ -1,7 +1,11 @@ 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? \