# Assume that Relation.from_xml has thrown an exception if there is an error parsing the xml
relation.create_with_history @user
# Assume that Relation.from_xml has thrown an exception if there is an error parsing the xml
relation.create_with_history @user
new_relation = Relation.from_xml(request.raw_post)
unless new_relation && new_relation.id == relation.id
new_relation = Relation.from_xml(request.raw_post)
unless new_relation && new_relation.id == relation.id
new_relation = Relation.from_xml(request.raw_post)
if new_relation && new_relation.id == relation.id
relation.delete_with_history!(new_relation, @user)
new_relation = Relation.from_xml(request.raw_post)
if new_relation && new_relation.id == relation.id
relation.delete_with_history!(new_relation, @user)
# finally add self and output
doc.root << relation.to_xml_node(visible_members, changeset_cache, user_display_name_cache)
# finally add self and output
doc.root << relation.to_xml_node(visible_members, changeset_cache, user_display_name_cache)
- fail OSM::APIBadUserInput.new("The parameter relations is required, and must be of the form relations=id[,id[,id...]]")
+ raise OSM::APIBadUserInput.new("The parameter relations is required, and must be of the form relations=id[,id[,id...]]")