From e9b28a28a7494500f0295b87cf9f3389d48a8c30 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 12 Feb 2019 17:29:22 +0000 Subject: Makes the Web IDE the default editor Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/42382 --- app/helpers/blob_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/helpers') diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index 23d6684a8e6..06beeebe2ba 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -31,12 +31,13 @@ module BlobHelper edit_button_tag(blob, common_classes, _('Edit'), - edit_blob_path(project, ref, path, options), + Feature.enabled?(:web_ide_default) ? ide_edit_path(project, ref, path, options) : edit_blob_path(project, ref, path, options), project, ref) end def ide_edit_button(project = @project, ref = @ref, path = @path, options = {}) + return unless Feature.enabled?(:web_ide_default) return unless blob = readable_blob(options, path, project, ref) edit_button_tag(blob, -- cgit v1.2.1