Stop pretending we support MySQL
This commit is contained in:
parent
4ee126a878
commit
beb0ef6357
9 changed files with 85 additions and 394 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue