Stop pretending we support MySQL

This commit is contained in:
Tom Hughes 2012-02-08 14:08:49 +00:00
parent 4ee126a878
commit beb0ef6357
9 changed files with 85 additions and 394 deletions

View file

@ -1,13 +1,3 @@
class Acl < ActiveRecord::Base
scope :address, lambda { |address| where("#{inet_aton} & netmask = address", address) }
private
def self.inet_aton
if self.connection.adapter_name == "MySQL"
"inet_aton(?)"
else
"?"
end
end
scope :address, lambda { |address| where("? & netmask = address", address) }
end