diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-18 03:09:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-18 03:09:21 +0000 |
commit | cfaf98a3b214c773f058ed9648314e4f147bbba4 (patch) | |
tree | c02a6855511a65696890c21270da5911896beff2 /app/helpers/diff_helper.rb | |
parent | c48065a833f9ead3357c48ea077165c15e8d585c (diff) | |
download | gitlab-ce-cfaf98a3b214c773f058ed9648314e4f147bbba4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/diff_helper.rb')
-rw-r--r-- | app/helpers/diff_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index 69a2efebb1f..d6d06434590 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -203,6 +203,14 @@ module DiffHelper set_secure_cookie(:diff_view, params.delete(:view), type: CookiesHelper::COOKIE_TYPE_PERMANENT) if params[:view].present? end + def unified_diff_lines_view_type(project) + if Feature.enabled?(:unified_diff_lines, project, default_enabled: true) + 'inline' + else + diff_view + end + end + private def diff_btn(title, name, selected) |