diff options
Diffstat (limited to 'app/controllers/projects/issues_controller.rb')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index c3ac8e107fb..b06a6f3bb0d 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Projects::IssuesController < Projects::ApplicationController include RendersNotes include ToggleSubscriptionAction @@ -125,7 +127,7 @@ class Projects::IssuesController < Projects::ApplicationController end def related_branches - @related_branches = @issue.related_branches(current_user) + @related_branches = Issues::RelatedBranchesService.new(project, current_user).execute(issue) respond_to do |format| format.json do @@ -161,6 +163,7 @@ class Projects::IssuesController < Projects::ApplicationController protected + # rubocop: disable CodeReuse/ActiveRecord def issue return @issue if defined?(@issue) @@ -172,6 +175,7 @@ class Projects::IssuesController < Projects::ApplicationController @issue end + # rubocop: enable CodeReuse/ActiveRecord alias_method :subscribable_resource, :issue alias_method :issuable, :issue alias_method :awardable, :issue |