Use for_issuable? instead of for_issuable_with_ability?

This commit is contained in:
Jarka Kadlecová 2018-07-03 08:48:00 +02:00
parent da841106a9
commit c9d561b1c2
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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