X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc2a2c8ebd1a11e4a64555fda22c6859a51defff..d581f1766532e9b92565e7af4ed086fdda8d780a:/app/models/old_relation.rb diff --git a/app/models/old_relation.rb b/app/models/old_relation.rb index deba6ecb6..0e85122a4 100644 --- a/app/models/old_relation.rb +++ b/app/models/old_relation.rb @@ -16,7 +16,9 @@ class OldRelation < ActiveRecord::Base has_many :old_members, -> { order(:sequence_id) }, :class_name => "OldRelationMember", :foreign_key => [:relation_id, :version] has_many :old_tags, :class_name => "OldRelationTag", :foreign_key => [:relation_id, :version] - validates_associated :changeset + validates :changeset, :presence => true, :associated => true + validates :timestamp, :presence => true + validates :visible, :inclusion => [true, false] def self.from_relation(relation) old_relation = OldRelation.new @@ -91,11 +93,6 @@ class OldRelation < ActiveRecord::Base el end - # Temporary method to match interface to nodes - def tags_as_hash - tags - end - # Temporary method to match interface to relations def relation_members old_members