validates_presence_of :changeset_id, :timestamp
validates_inclusion_of :visible, :in => [ true, false ]
validates_numericality_of :latitude, :longitude
validate :validate_position
validates_presence_of :changeset_id, :timestamp
validates_inclusion_of :visible, :in => [ true, false ]
validates_numericality_of :latitude, :longitude
validate :validate_position
old_node.tags = node.tags
old_node.timestamp = node.timestamp
old_node.changeset_id = node.changeset_id
old_node.tags = node.tags
old_node.timestamp = node.timestamp
old_node.changeset_id = node.changeset_id
el1['lat'] = self.lat.to_s
el1['lon'] = self.lon.to_s
el1['changeset'] = self.changeset.id.to_s
el1['lat'] = self.lat.to_s
el1['lon'] = self.lon.to_s
el1['changeset'] = self.changeset.id.to_s
- el1['user'] = self.changeset.user.display_name if self.changeset.user.data_public?
+ if self.changeset.user.data_public?
+ el1['user'] = self.changeset.user.display_name
+ el1['uid'] = self.changeset.user.id.to_s
+ end
- @attributes.update(OldNode.find(:first, :conditions => ['id = ? AND timestamp = ?', self.id, self.timestamp]).instance_variable_get('@attributes'))
+ @attributes.update(OldNode.where(:node_id => self.node_id, :timestamp => self.timestamp, :version => self.version).first.instance_variable_get('@attributes'))