X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/15ab888d0c832a4d72fe19cfb4fc696aba482dca..3d55db46ed24d563d82cf42f91fd064e40447c4d:/app/models/node.rb diff --git a/app/models/node.rb b/app/models/node.rb index 1aff4101e..70c6fb880 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -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 #