projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Created a partial to DRY the aja voting method. Modified the voter class to
[selectricity-live]
/
app
/
models
/
full_voter.rb
diff --git
a/app/models/full_voter.rb
b/app/models/full_voter.rb
index b82667c3f926f6d82f61e3844010744cc2466fdf..9e5709eb77d96c78c67ca050e497a6f92255b93a 100644
(file)
--- a/
app/models/full_voter.rb
+++ b/
app/models/full_voter.rb
@@
-1,7
+1,11
@@
class FullVoter < Voter
class FullVoter < Voter
- before_create :create_password
validates_presence_of :email, :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? \
def create_password
token_generator = UniqueTokenGenerator.new( 16 )
until password and not password.empty? \
Benjamin Mako Hill
||
Want to submit a patch?