1 class Acl < ActiveRecord::Base
2 def self.find_by_address(address, options)
3 self.with_scope(:find => {:conditions => ["#{inet_aton} & netmask = address", address]}) do
4 return self.find(:first, options)
8 def self.find_all_by_address(address, options)
9 self.with_scope(:find => {:conditions => ["#{inet_aton} & netmask = address", address]}) do
10 return self.find(:all, options)
17 if self.connection.adapter_name == "MySQL"