projects
/
selectricity
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
af840c5
)
fix type in description text
author
<mako@atdot.cc>
<>
Mon, 18 Aug 2008 20:26:00 +0000
(16:26 -0400)
committer
<mako@atdot.cc>
<>
Mon, 18 Aug 2008 20:26:00 +0000
(16:26 -0400)
app/models/vote.rb
patch
|
blob
|
history
app/views/voter/review.rhtml
patch
|
blob
|
history
diff --git
a/app/models/vote.rb
b/app/models/vote.rb
index 21b5408ff8c83e130ff8154f3380c7a1a1cc4c96..98b5704e0aefce54a4ffc86861d2391e13357425 100644
(file)
--- a/
app/models/vote.rb
+++ b/
app/models/vote.rb
@@
-87,7
+87,7
@@
class Vote < ActiveRecord::Base
# too. It creates a vote with the candidates listed in order of preference
# based on alphabetical order. Meant to be manipulated and then confirmed
def set_defaults!
# too. It creates a vote with the candidates listed in order of preference
# based on alphabetical order. Meant to be manipulated and then confirmed
def set_defaults!
- self.votes =
voter.election.candidates.sort
.collect {|c| c.id }
+ self.votes =
self.voter.election.candidates.sort_by { rand }
.collect {|c| c.id }
self.save
end
self.save
end
diff --git
a/app/views/voter/review.rhtml
b/app/views/voter/review.rhtml
index d9ecf19cdd427d9583103665a56d2d458d13f48d..7ecaf5fb7a054d8647cd4360a2bc03d901d75bb3 100644
(file)
--- a/
app/views/voter/review.rhtml
+++ b/
app/views/voter/review.rhtml
@@
-27,7
+27,7
@@
preferred to least preferred:</p>
<p><%= button_to 'Confirm This Vote', :action => 'confirm', :id => @voter.password %></p>
<p>If you choose, you will be able to go back<br />and change it up until
<p><%= button_to 'Confirm This Vote', :action => 'confirm', :id => @voter.password %></p>
<p>If you choose, you will be able to go back<br />and change it up until
- the end of
ht
e voting period.</p>
+ the end of
th
e voting period.</p>
<p><%= button_to 'Discard This Vote', votepassword_url(
:action => 'index', :urlpassword => @voter.password) %></p>
<p><%= button_to 'Discard This Vote', votepassword_url(
:action => 'index', :urlpassword => @voter.password) %></p>
Benjamin Mako Hill
||
Want to submit a patch?