]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/acl.rb
Guard against non-numeric lat and lons in nodes and notes
[rails.git] / app / models / acl.rb
index 9938984aa89a3d83cef907430c6288fed3aabe07..2db7fb76522a0342324d235367ae51d0c5932c97 100644 (file)
@@ -1,9 +1,9 @@
 class Acl < ActiveRecord::Base
   def self.match(address, domain = nil)
     if domain
-      condition = Acl.where("address >> ? OR domain = ?", address, domain)
+      condition = Acl.where("address >>= ? OR domain = ?", address, domain)
     else
-      condition = Acl.where("address >> ?", address)
+      condition = Acl.where("address >>= ?", address)
     end
   end