Combine the address and netmask for an ACL in one column
[rails.git] / app / models / acl.rb
index 04f04d8f96d2b93ae8eb94eb0a6d36dc133a855f..8eeb2310a77674545fa68c2c1d5d8f7deb75e7e0 100644 (file)
@@ -1,3 +1,3 @@
 class Acl < ActiveRecord::Base
-  scope :address, lambda { |address| where("? & netmask = address", address) }
+  scope :address, lambda { |address| where("address >> ?", address) }
 end