From c9d561b1c2802aa971b566d434dfffa101129e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarka=20Kadlecov=C3=A1?= Date: Tue, 3 Jul 2018 08:48:00 +0200 Subject: [PATCH] Use for_issuable? instead of for_issuable_with_ability? --- app/models/note.rb | 2 +- app/services/todo_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/note.rb b/app/models/note.rb index 9191cae6391..3918bbee194 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -229,7 +229,7 @@ class Note < ActiveRecord::Base !for_personal_snippet? end - def for_issuable_with_ability? + def for_issuable? for_issue? || for_merge_request? end diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index 4a7e89a63c7..46f12086555 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -321,7 +321,7 @@ class TodoService end def reject_users_without_access(users, parent, target) - if target.is_a?(Note) && target.for_issuable_with_ability? + if target.is_a?(Note) && target.for_issuable? target = target.noteable end