]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Cope with MESSAGES_DOMAIN not being defined
[rails.git] / app / models / node.rb
index 1aff4101e75b8643f05c21a481629ff499197128..70c6fb880ed9c46c2047150780d816342be022c8 100644 (file)
@@ -30,9 +30,12 @@ class Node < ActiveRecord::Base
   validate :validate_position
   validates_associated :changeset
 
+  scope :visible, where(:visible => true)
+  scope :invisible, where(:visible => false)
+
   # Sanity check the latitude and longitude and add an error if it's broken
   def validate_position
-    errors.add_to_base("Node is not in the world") unless in_world?
+    errors.add(:base, "Node is not in the world") unless in_world?
   end
 
   #