Welcome to mirror list, hosted at ThFree Co, Russian Federation.

workhorse_multipart.rb « initializers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8de7140e3d41a15a9d3354a8f4d5405368852d1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Rails.application.configure do |config|
  config.middleware.use(Gitlab::Middleware::Multipart)
end

module Gitlab
  module StrongParameterScalars
    GITLAB_PERMITTED_SCALAR_TYPES = [::UploadedFile]

    def permitted_scalar?(value)
      super || GITLAB_PERMITTED_SCALAR_TYPES.any? { |type| value.is_a?(type) }
    end
  end
end

module ActionController
  class Parameters
    prepend Gitlab::StrongParameterScalars
  end
end