1 class Acl < ActiveRecord::Base
2 def self.match(address, domain = nil)
4 condition = Acl.where("address >>= ? OR domain = ?", address, domain)
6 condition = Acl.where("address >>= ?", address)
10 def self.no_account_creation(address, domain = nil)
11 self.match(address, domain).where(:k => "no_account_creation").exists?
14 def self.no_note_comment(address, domain = nil)
15 self.match(address, domain).where(:k => "no_note_comment").exists?
18 def self.no_trace_download(address, domain = nil)
19 self.match(address, domain).where(:k => "no_trace_download").exists?