source: subversion/sites/rails_port_branches/api06/app/models/acl.rb @ 14477

Revision 14477, 428 bytes checked in by smsm1, 5 years ago (diff)

reverting last change, which included posgres config specific things

Line 
1class 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)
5    end
6  end
7
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)
11    end
12  end
13end
Note: See TracBrowser for help on using the repository browser.