diff options
author | Phil Hughes <me@iamphill.com> | 2019-02-27 15:44:24 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-02-27 15:44:24 +0300 |
commit | 8e5911353bcb48155dc5dffab6a732bbba49cd37 (patch) | |
tree | 02be38975415726c206741e161481451dec5c8dd /app/serializers | |
parent | d6696f819b5b47752c6451f939d24f0f03054663 (diff) |
Use Web IDE path for merge request edit buttons
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/diff_file_base_entity.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/serializers/diff_file_base_entity.rb b/app/serializers/diff_file_base_entity.rb index ede9e04b722..d8630165e49 100644 --- a/app/serializers/diff_file_base_entity.rb +++ b/app/serializers/diff_file_base_entity.rb @@ -27,9 +27,13 @@ class DiffFileBaseEntity < Grape::Entity next unless merge_request.source_project - project_edit_blob_path(merge_request.source_project, - tree_join(merge_request.source_branch, diff_file.new_path), - options) + if Feature.enabled?(:web_ide_default) + ide_edit_path(merge_request.source_project, merge_request.source_branch, diff_file.new_path) + else + project_edit_blob_path(merge_request.source_project, + tree_join(merge_request.source_branch, diff_file.new_path), + options) + end end expose :old_path_html do |diff_file| |