Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix filter expressions

  • Loading branch information...
commit 224c0ce48dde3c390efd655383d8b4143873e44d 1 parent 4211cf9
@netskin-ci netskin-ci authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/sequel_mappable.rb
View
8 lib/sequel_mappable.rb
@@ -48,16 +48,16 @@ def bounded_location(origin, within)
sw, ne = bounds.sw, bounds.ne
filter = self
if bounds.crosses_meridian?
- filter = filter.filter{ (:lng < ne.lng) | (:lng > sw.lng) }
+ filter = filter.filter{(lng < ne.lng) | (lng > sw.lng)}
else
- filter = filter.filter{ (:lng < ne.lng) & (:lng > sw.lng) }
+ filter = filter.filter{(lng < ne.lng) & (lng > sw.lng)}
end
- filter.filter{ (:lat < ne.lat) & (:lat > sw.lat) }
+ filter.filter{(lat < ne.lat) & (lat > sw.lat)}
end
def area(origin, within)
sql = model.distance_sql(origin)
- bounded_location(origin, within).filter{ sql.lit <= within }
+ bounded_location(origin, within).filter{sql.lit <= within}
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.