X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2f55a3f0a80974922678d7677902d169b3481693..84b67e00a07262139f2cc9e9460f4afd35e91349:/app/models/old_segment.rb diff --git a/app/models/old_segment.rb b/app/models/old_segment.rb index 7eac278fe..c243c522d 100644 --- a/app/models/old_segment.rb +++ b/app/models/old_segment.rb @@ -1,6 +1,10 @@ class OldSegment < ActiveRecord::Base set_table_name 'segments' + validates_presence_of :user_id, :timestamp + validates_inclusion_of :visible, :in => [ true, false ] + validates_numericality_of :node_a, :node_b + belongs_to :user def self.from_segment(segment)