]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/acl.rb
Add padding between the last diary post and the pagination links
[rails.git] / app / models / acl.rb
index 0c89968289e60e78d806230f9851535d795c6115..529ccbe3bc26640dfb057674aca5b433ec1582d3 100644 (file)
@@ -1,9 +1,11 @@
 class Acl < ActiveRecord::Base
+  validates :k, :presence => true
+
   def self.match(address, domain = nil)
     if domain
-      condition = Acl.where("address >>= ? OR domain = ?", address, domain)
+      Acl.where("address >>= ? OR domain = ?", address, domain)
     else
-      condition = Acl.where("address >>= ?", address)
+      Acl.where("address >>= ?", address)
     end
   end