fix ip ban bug

This commit is contained in:
albert
2013-02-23 11:20:16 -05:00
parent 4c3159b662
commit ec8c0e8f19

View File

@@ -7,7 +7,7 @@ class IpBan < ActiveRecord::Base
validates_uniqueness_of :ip_addr, :if => lambda {|rec| rec.ip_addr =~ IP_ADDR_REGEX}
def self.is_banned?(ip_addr)
exists?("ip_addr = ?", ip_addr)
exists?(["ip_addr = ?", ip_addr])
end
def self.search(params)