Rename Note#for_project_snippet? to #for_snippet?

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2016-03-31 09:20:27 +02:00
parent 0af8587d88
commit 091b8a6ede
No known key found for this signature in database
GPG key ID: 46DF07E5CD9E96AB
4 changed files with 4 additions and 4 deletions

View file

@ -311,7 +311,7 @@ class Note < ActiveRecord::Base
for_merge_request? && for_diff_line?
end
def for_project_snippet?
def for_snippet?
noteable_type == "Snippet"
end

View file

@ -123,7 +123,7 @@ class TodoService
def handle_note(note, author)
# Skip system notes, and notes on project snippet
return if note.system? || note.for_project_snippet?
return if note.system? || note.for_snippet?
project = note.project
target = note.noteable

View file

@ -41,7 +41,7 @@ module Gitlab
data[:issue] = note.noteable.hook_attrs
elsif note.for_merge_request?
data[:merge_request] = note.noteable.hook_attrs
elsif note.for_project_snippet?
elsif note.for_snippet?
data[:snippet] = note.noteable.hook_attrs
end

View file

@ -46,7 +46,7 @@ module Gitlab
merge_request = MergeRequest.find(note.noteable_id)
merge_request_url(merge_request,
anchor: "note_#{note.id}")
elsif note.for_project_snippet?
elsif note.for_snippet?
snippet = Snippet.find(note.noteable_id)
project_snippet_url(snippet,
anchor: "note_#{note.id}")