X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/dc2a2c8ebd1a11e4a64555fda22c6859a51defff..a3b25550469eb07c7cfbb0dc06e8c6cfc9fc1230:/app/models/old_node.rb diff --git a/app/models/old_node.rb b/app/models/old_node.rb index 5b5739ff2..84899d7fb 100644 --- a/app/models/old_node.rb +++ b/app/models/old_node.rb @@ -10,11 +10,15 @@ class OldNode < ActiveRecord::Base # the queries generated by Redactable will use the wrong table name. include Redactable - validates_presence_of :changeset_id, :timestamp - validates_inclusion_of :visible, :in => [true, false] - validates_numericality_of :latitude, :longitude + validates :changeset, :presence => true, :associated => true + validates :latitude, :presence => true, + :numericality => { :integer_only => true } + validates :longitude, :presence => true, + :numericality => { :integer_only => true } + validates :timestamp, :presence => true + validates :visible, :inclusion => [true, false] + validate :validate_position - validates_associated :changeset belongs_to :changeset belongs_to :redaction