Skip to content

Commit

Permalink
return 0s if OVER_QUERY_LMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Crews committed Jul 15, 2010
1 parent d34d2ab commit e30be31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/google_directions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def xml_call
end

def drive_time_in_minutes
if @status == "NOT_FOUND"
if @status == "NOT_FOUND" or @status == "OVER_QUERY_LIMIT"
drive_time = 0
else
doc = Nokogiri::XML(@xml)
Expand All @@ -41,7 +41,7 @@ def drive_time_in_minutes
end

def distance_in_miles
if @status == "NOT_FOUND"
if @status == "NOT_FOUND" or @status == "OVER_QUERY_LIMIT"
distance_in_miles = 0
else
doc = Nokogiri::XML(@xml)
Expand Down

0 comments on commit e30be31

Please sign in to comment.