]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/acl.rb
Merge remote-tracking branch 'upstream/pull/2267'
[rails.git] / app / models / acl.rb
index 8bb4ae4b9dd8ebf294419aa141ebeaea5f4d7994..cf83e673c0ecfbcfdf48dd82c73d74104eae7516 100644 (file)
@@ -1,4 +1,23 @@
+# == Schema Information
+#
+# Table name: acls
+#
+#  id      :bigint(8)        not null, primary key
+#  address :inet
+#  k       :string           not null
+#  v       :string
+#  domain  :string
+#
+# Indexes
+#
+#  acls_k_idx             (k)
+#  index_acls_on_address  (address) USING gist
+#  index_acls_on_domain   (domain)
+#
+
 class Acl < ActiveRecord::Base
+  validates :k, :presence => true
+
   def self.match(address, domain = nil)
     if domain
       Acl.where("address >>= ? OR domain = ?", address, domain)