summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorPeter Leitzen <pleitzen@gitlab.com>2019-08-20 10:52:21 +0000
committerThong Kuah <tkuah@gitlab.com>2019-08-20 10:52:21 +0000
commit6767326267a649a04a0f6c7634be87577a788a3d (patch)
treeba92b162d8c21fe6be0b2491e188ab4cacd191b3 /app/controllers
parent51c19691e4c4ceb60ef28fd08c6b13549a423a39 (diff)
downloadgitlab-ce-6767326267a649a04a0f6c7634be87577a788a3d.tar.gz
Use ActiveModel's type instead of virtus
The virtus project has been discontinued: https://github.com/solnic/virtus/commit/a6f896984
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/blob_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb
index b04ffe80db4..4125f44d00a 100644
--- a/app/controllers/projects/blob_controller.rb
+++ b/app/controllers/projects/blob_controller.rb
@@ -92,7 +92,7 @@ class Projects::BlobController < Projects::ApplicationController
def diff
apply_diff_view_cookie!
- @form = Blobs::UnfoldPresenter.new(blob, params.to_unsafe_h)
+ @form = Blobs::UnfoldPresenter.new(blob, diff_params)
# keep only json rendering when
# https://gitlab.com/gitlab-org/gitlab-ce/issues/44988 is done
@@ -239,4 +239,8 @@ class Projects::BlobController < Projects::ApplicationController
def tree_path
@path.rpartition('/').first
end
+
+ def diff_params
+ params.permit(:full, :since, :to, :bottom, :unfold, :offset, :indent)
+ end
end