You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: versions_controller.rb
    path of file: ./repos/spotlight/app/controllers/spotlight
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Spotlight
  ##
  # Controller for reverting t
    
    def revert
      obj = @version.reify
      if obj && authorize!(:manage, obj)
        if obj.save
          redirect_to [obj.exhibit, obj], flash: { html_safe: true }, notice: undo_link
        else
          redirect_to [obj.exhibit, obj], flash: { html_safe: true }, notice: view_context.t(:'spotlight.versions.undo_error')
        end