Combine the address and netmask for an ACL in one column
This commit is contained in:
parent
beb0ef6357
commit
9c0d5277ad
2 changed files with 46 additions and 1 deletions
|
@ -1,3 +1,3 @@
|
|||
class Acl < ActiveRecord::Base
|
||||
scope :address, lambda { |address| where("? & netmask = address", address) }
|
||||
scope :address, lambda { |address| where("address >> ?", address) }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue