Satisfy Rubocop.

This commit is contained in:
Douwe Maan 2015-02-20 14:39:35 +01:00
parent 73d12d6e6d
commit 938a1381fc
4 changed files with 9 additions and 7 deletions

View file

@ -16,4 +16,4 @@ class Projects::UploadsController < Projects::ApplicationController
not_found!
end
end
end
end

View file

@ -10,4 +10,4 @@ begin
rescue
# If ActionDispatch::Static wasn't loaded onto the stack (like in production),
# an exception is raised.
end
end

View file

@ -75,12 +75,14 @@ Gitlab::Application.routes.draw do
scope path: :uploads do
# Note attachments and User/Group/Project avatars
get ":model/:mounted_as/:id/:filename", to: "uploads#show",
constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /.+/ }
get ":model/:mounted_as/:id/:filename",
to: "uploads#show",
constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /.+/ }
# Project markdown uploads
get ":id/:secret/:filename", to: "projects/uploads#show",
constraints: { id: /[a-zA-Z.0-9_\-]+\/[a-zA-Z.0-9_\-]+/, filename: /.+/ }
get ":id/:secret/:filename",
to: "projects/uploads#show",
constraints: { id: /[a-zA-Z.0-9_\-]+\/[a-zA-Z.0-9_\-]+/, filename: /.+/ }
end
#

View file

@ -10,4 +10,4 @@ module Gitlab
end
end
end
end
end