]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/relations_controller.rb
Merge branch 'master' into patch/view_migration
[rails.git] / app / controllers / api / relations_controller.rb
index 41f4e325afa8c21db018946b257775b312755d12..2f2cb8503217970f21ede6477e7ae9cca08524a3 100644 (file)
@@ -22,11 +22,9 @@ module Api
     end
 
     def show
-      relation = Relation.find(params[:id])
-      response.last_modified = relation.timestamp
-      if relation.visible
-        @relation = relation
-
+      @relation = Relation.find(params[:id])
+      response.last_modified = @relation.timestamp
+      if @relation.visible
         # Render the result
         respond_to do |format|
           format.xml