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
- el1['user'] = self.changeset.user.display_name if self.changeset.user.data_public?
+ el1['changeset'] = self.changeset.id.to_s
+ 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.find(:first, :conditions => ['id = ? AND timestamp = ? AND version = ?', self.id, self.timestamp, self.version]).instance_variable_get('@attributes'))