X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/363155a2a86796d27ee9161f1ee9b74d6fa307e5..0db30c611a99d62381217d86c5a0bd9d104efb42:/app/controllers/api/relations_controller.rb?ds=sidebyside diff --git a/app/controllers/api/relations_controller.rb b/app/controllers/api/relations_controller.rb index 9f125cfd3..ba0dd0c6b 100644 --- a/app/controllers/api/relations_controller.rb +++ b/app/controllers/api/relations_controller.rb @@ -22,15 +22,11 @@ module Api end def show - relation = Relation.find(params[:id]) - response.last_modified = relation.timestamp - if relation.visible - @relations = [relation] - + @relation = Relation.find(params[:id]) + response.last_modified = @relation.timestamp + if @relation.visible # Render the result - respond_to do |format| - format.xml - end + render :formats => [:xml] else head :gone end @@ -94,8 +90,6 @@ module Api nodes = Node.where(:id => node_ids.uniq).includes(:node_tags) visible_nodes = {} - # changeset_cache = {} - # user_display_name_cache = {} @nodes = [] nodes.each do |node| @@ -123,9 +117,7 @@ module Api @relations << relation # Render the result - respond_to do |format| - format.xml - end + render :formats => [:xml] else head :gone end @@ -141,9 +133,7 @@ module Api @relations = Relation.find(ids) # Render the result - respond_to do |format| - format.xml - end + render :formats => [:xml] end def relations_for_way @@ -170,9 +160,7 @@ module Api end # Render the result - respond_to do |format| - format.xml - end + render :formats => [:xml] end end end