Permalink
Browse files

Merge pull request #31 from theduckylittle/fixing_flipped

Fixing the "flipped" status of a record, Removed "excensus" branch notice -
thanks for the edits!
  • Loading branch information...
2 parents 7c2f08e + 6c11b06 commit 2500432a06d34ea726ec8b86c703430c8224b5d0 @ajturner ajturner committed Aug 15, 2012
Showing with 4 additions and 9 deletions.
  1. +0 −5 README.rdoc
  2. +4 −4 lib/geocoder/us/database.rb
View
@@ -15,11 +15,6 @@ versus cardinal numbers, and more.
Geocoder::US 2.0 is shipped with a free US ZIP code data set, compiled from
public domain sources.
-== "excensus" Branch
-
-The "excensus" branch is the actively modified branch of Excensus LLC, maintained
-by Dan "Ducky" Little (GitHub: theduckylittle, dan.little-at-excensus-dot-com).
-
== Synopsis
>> require 'geocoder/us'
@@ -267,12 +267,12 @@ def range_ends (edge_ids)
FROM range WHERE tlid IN (#{in_list})
GROUP BY tlid, side;"
execute(sql, *edge_ids).map {|r|
- if r[:flipped] == "0"
- r[:flipped] = false
- r[:fromhn], r[:tohn] = r[:from0], r[:to0]
- else
+ if r[:flipped].to_i == 1
r[:flipped] = true
r[:fromhn], r[:tohn] = r[:from1], r[:to1]
+ else
+ r[:flipped] = false
+ r[:fromhn], r[:tohn] = r[:from0], r[:to0]
end
[:from0, :to0, :from1, :to1].each {|k| r.delete k}
r

0 comments on commit 2500432

Please sign in to comment.