Debugging pull preview

pull/6038/head
Wieland Lindenthal 7 years ago
parent f9dca0efc5
commit 14e88ad4ea
  1. 4
      app/controllers/attachments_controller.rb
  2. 6
      config/routes.rb

@ -52,6 +52,10 @@ class AttachmentsController < ApplicationController
end
end
def fulltext
render plain: @attachment.fulltext.to_s
end
private
def find_project

@ -463,11 +463,15 @@ OpenProject::Application.routes.draw do
format: false
end
resources :attachments, only: [:destroy], format: false do
resources :attachments, only: [:destroy, :fulltext], format: false do
member do
scope via: :get, constraints: { id: /\d+/, filename: /[^\/]*/ } do
match '(/:filename)' => 'attachments#download', as: 'download'
end
scope via: :get, constraints: { id: /\d+/, filename: /[^\/]*/ } do
match '(/:filename/fulltext)' => 'attachments#fulltext', as: 'fulltext'
end
end
end

Loading…
Cancel
Save