]> git.openstreetmap.org Git - rails.git/blob - app/models/old_segment.rb
way stuff
[rails.git] / app / models / old_segment.rb
1 class OldSegment < ActiveRecord::Base
2   set_table_name 'segments'
3
4   belongs_to :user
5
6   def self.from_segment(segment)
7     old_segment = OldSegment.new
8     old_segment.node_a = segment.node_a
9     old_segment.node_b = segment.node_b
10     old_segment.visible = segment.visible
11     old_segment.tags = segment.tags
12     old_segment.timestamp = segment.timestamp
13     old_segment.user_id = segment.user_id
14     old_segment.id = segment.id
15     return old_segment
16   end
17
18 end