# 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]
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