Combine the address and netmask for an ACL in one column

This commit is contained in:
Tom Hughes 2012-02-08 14:09:50 +00:00
parent beb0ef6357
commit 9c0d5277ad
2 changed files with 46 additions and 1 deletions

View 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