modify app/controllers/documents_controller.rb