X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b527d27674f0ad4ad66075def914bde695d4d88e..398d5fa3298b7aacea4a9cbddd0c4e5f8a9e6638:/app/models/relation.rb diff --git a/app/models/relation.rb b/app/models/relation.rb index cd2d67cdd..a1dc9f81d 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -10,8 +10,8 @@ class Relation < ActiveRecord::Base has_many :relation_members, :foreign_key => 'id' has_many :relation_tags, :foreign_key => 'id' - has_many :containing_relation_members, :as => :member - has_many :containing_relations, :through => :containing_relation_members + has_many :containing_relation_members, :class_name => "RelationMember", :as => :member + has_many :containing_relations, :class_name => "Relation", :through => :containing_relation_members, :source => :relation def self.from_xml(xml, create=false) begin @@ -257,4 +257,8 @@ class Relation < ActiveRecord::Base return false end + # Temporary method to match interface to nodes + def tags_as_hash + return self.tags + end end