projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
turned off memcache as it was causing trouble
[selectricity-live]
/
app
/
controllers
/
quickvote_controller.rb
diff --git
a/app/controllers/quickvote_controller.rb
b/app/controllers/quickvote_controller.rb
index 5bf259caf7427d89a9149437ee52844bac93a295..eef3402c109ac813237ce739748345c9d30b02f8 100644
(file)
--- a/
app/controllers/quickvote_controller.rb
+++ b/
app/controllers/quickvote_controller.rb
@@
-169,8
+169,8
@@
class QuickvoteController < ApplicationController
@election.voters.each do |voter|
next unless voter.ipaddress
location=nil
@election.voters.each do |voter|
next unless voter.ipaddress
location=nil
- if Cache and location=Cache.get("GEO:#{voter.ipaddress}")
- elsif Cache
+ if
defined?
Cache and location=Cache.get("GEO:#{voter.ipaddress}")
+ elsif
defined?
Cache
location = GeoKit::Geocoders::IpGeocoder.geocode(voter.ipaddress)
Cache.set "GEO:#{voter.ipaddress}", location
else
location = GeoKit::Geocoders::IpGeocoder.geocode(voter.ipaddress)
Cache.set "GEO:#{voter.ipaddress}", location
else
Benjamin Mako Hill
||
Want to submit a patch?