X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/363155a2a86796d27ee9161f1ee9b74d6fa307e5..0baa293699cf6efaea979b342ec877af522213ca:/app/controllers/api/old_controller.rb?ds=sidebyside diff --git a/app/controllers/api/old_controller.rb b/app/controllers/api/old_controller.rb index 39bb35ca9..862d14716 100644 --- a/app/controllers/api/old_controller.rb +++ b/app/controllers/api/old_controller.rb @@ -22,22 +22,15 @@ module Api # to do that ourselves. raise OSM::APINotFoundError if @elements.empty? - visible_elements = if show_redactions? - @elements - else - @elements.unredacted - end - - @elems = [] - - visible_elements.each do |element| - @elems << element - end + # determine visible elements + @elems = if show_redactions? + @elements + else + @elements.unredacted + end # Render the result - respond_to do |format| - format.xml - end + render :formats => [:xml] end def version @@ -47,12 +40,8 @@ module Api else response.last_modified = @old_element.timestamp - @elems = [@old_element] - # Render the result - respond_to do |format| - format.xml - end + render :formats => [:xml] end end