X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e9b86e914d1e09eb012974848f5edb438665d36f..700da2b3470de2a7826472160e1c93d8a983fefa:/app/models/old_node.rb diff --git a/app/models/old_node.rb b/app/models/old_node.rb index 5d9c6d7ef..42f55f2d0 100644 --- a/app/models/old_node.rb +++ b/app/models/old_node.rb @@ -1,5 +1,6 @@ -class OldNode < GeoRecord - set_primary_keys :id, :version +class OldNode < ActiveRecord::Base + include GeoRecord + set_table_name 'nodes' validates_presence_of :user_id, :timestamp @@ -90,5 +91,21 @@ class OldNode < GeoRecord def tags=(t) @tags = t end - + def tags_as_hash + hash = {} + Tags.split(self.tags) do |k,v| + hash[k] = v + end + hash + end + + # Pretend we're not in any ways + def ways + return [] + end + + # Pretend we're not in any relations + def containing_relation_members + return [] + end end