projects
/
selectricity
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed CSS and layout to move from the old name (HC) to the new name
[selectricity]
/
app
/
controllers
/
quickvote_controller.rb
diff --git
a/app/controllers/quickvote_controller.rb
b/app/controllers/quickvote_controller.rb
index 7c754746959b70573da798003fb63643b81ea899..c7e52d6b12fc5d9040629bd183069cc9b157b8ff 100644
(file)
--- a/
app/controllers/quickvote_controller.rb
+++ b/
app/controllers/quickvote_controller.rb
@@
-1,5
+1,5
@@
class QuickvoteController < ApplicationController
class QuickvoteController < ApplicationController
- layout '
hc
'
+ layout '
main
'
model :quick_voter
model :quick_vote
model :vote
model :quick_voter
model :quick_vote
model :vote
@@
-66,7
+66,7
@@
class QuickvoteController < ApplicationController
@voter = nil
end
@voter = nil
end
- # if the voter does not exist or as has been destroyed, lets
+ # if the voter does not exist or
h
as has been destroyed, lets
# create a new one
unless @voter
# create a new voter and populate it
# create a new one
unless @voter
# create a new voter and populate it
@@
-108,8
+108,13
@@
class QuickvoteController < ApplicationController
@voter.ipaddress = request.env["REMOTE_ADDR"]
@voter.save
@voter.ipaddress = request.env["REMOTE_ADDR"]
@voter.save
- # toggle the confirmation bit
+ # save the time the vote was made for statistical use, it doesn't
+ #work here unless I use a method that will save it to the db
+ @voter.vote.time = Time.now
+
+ # toggle the confirmation bit
@voter.vote.confirm!
@voter.vote.confirm!
+
@voter.reload
render :action => 'thanks'
end
@voter.reload
render :action => 'thanks'
end
@@
-161,7
+166,9
@@
class QuickvoteController < ApplicationController
@condorcet_result = PureCondorcetVote.new(preference_tally).result
@ssd_result = CloneproofSSDVote.new(preference_tally).result
@borda_result = BordaVote.new(preference_tally).result
@condorcet_result = PureCondorcetVote.new(preference_tally).result
@ssd_result = CloneproofSSDVote.new(preference_tally).result
@borda_result = BordaVote.new(preference_tally).result
- @runoff_result = InstantRunoffVote.new(preference_tally).result
+ #@runoff_result = InstantRunoffVote.new(preference_tally).result
+ #@runoff_results = PluralityVote.new(preference_tally).result
+
@candidates = {}
@election.candidates.each {|c| @candidates[c.id] = c}
@candidates = {}
@election.candidates.each {|c| @candidates[c.id] = c}
Benjamin Mako Hill
||
Want to submit a patch?