]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/old_controller.rb
Make the logo on the error page clickable
[rails.git] / app / controllers / api / old_controller.rb
index bf3fcdb39ee1a725f814cefa25d17727eb52b4bd..862d14716f9b12e34c25e6629ada8d1b7e16b8e2 100644 (file)
@@ -22,18 +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
+      # 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
@@ -44,9 +41,7 @@ module Api
         response.last_modified = @old_element.timestamp
 
         # Render the result
-        respond_to do |format|
-          format.xml
-        end
+        render :formats => [:xml]
       end
     end