]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/old_controller.rb
Standardise on double quoted strings
[rails.git] / app / controllers / old_controller.rb
index 002da675c687fb5cf2df1070da6d19881e78d956..ff86407f5011fbcd8862a768391656964ada2935 100644 (file)
@@ -2,7 +2,7 @@
 # into one place. as it turns out, the API methods for historical
 # nodes, ways and relations are basically identical.
 class OldController < ApplicationController
-  require 'xml/libxml'
+  require "xml/libxml"
 
   skip_before_filter :verify_authenticity_token
   before_filter :setup_user_auth, :only => [:history, :version]
@@ -52,17 +52,16 @@ class OldController < ApplicationController
   end
 
   def redact
-    redaction_id = params['redaction']
-    unless redaction_id.nil?
+    redaction_id = params["redaction"]
+    if redaction_id.nil?
+      # if no redaction ID was provided, then this is an unredact
+      # operation.
+      @old_element.redact!(nil)
+    else
       # if a redaction ID was specified, then set this element to
       # be redacted in that redaction.
       redaction = Redaction.find(redaction_id.to_i)
       @old_element.redact!(redaction)
-
-    else
-      # if no redaction ID was provided, then this is an unredact
-      # operation.
-      @old_element.redact!(nil)
     end
 
     # just return an empty 200 OK for success