diff options
author | Peter Leitzen <pleitzen@gitlab.com> | 2019-08-20 13:52:21 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-08-20 13:52:21 +0300 |
commit | 6767326267a649a04a0f6c7634be87577a788a3d (patch) | |
tree | ba92b162d8c21fe6be0b2491e188ab4cacd191b3 /app/controllers/projects/blob_controller.rb | |
parent | 51c19691e4c4ceb60ef28fd08c6b13549a423a39 (diff) |
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/projects/blob_controller.rb')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 6 |
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 |