Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarka Kadlecova <jarka@gitlab.com>2017-01-20 13:28:40 +0300
committerJarka Kadlecova <jarka@gitlab.com>2017-01-25 12:10:05 +0300
commit0c350b79395d6712c7c4fee649cdbd77aa4052cc (patch)
tree2899a67fbe65c29b84c35ab417dbec96913095c4 /app/services/notes
parentbf708e55c2e6035b64861a1cda8bfe3d3b4a2105 (diff)
address comments
Diffstat (limited to 'app/services/notes')
-rw-r--r--app/services/notes/post_process_service.rb9
-rw-r--r--app/services/notes/slash_commands_service.rb2
2 files changed, 6 insertions, 5 deletions
diff --git a/app/services/notes/post_process_service.rb b/app/services/notes/post_process_service.rb
index 45d916800f6..6a10e172483 100644
--- a/app/services/notes/post_process_service.rb
+++ b/app/services/notes/post_process_service.rb
@@ -10,10 +10,11 @@ module Notes
# Skip system notes, like status changes and cross-references and awards
unless @note.system?
EventCreateService.new.leave_note(@note, @note.author)
- unless @note.for_personal_snippet?
- @note.create_cross_references!
- execute_note_hooks
- end
+
+ return if @note.for_personal_snippet?
+
+ @note.create_cross_references!
+ execute_note_hooks
end
end
diff --git a/app/services/notes/slash_commands_service.rb b/app/services/notes/slash_commands_service.rb
index aaea9717fc4..56913568cae 100644
--- a/app/services/notes/slash_commands_service.rb
+++ b/app/services/notes/slash_commands_service.rb
@@ -12,7 +12,7 @@ module Notes
def self.supported?(note, current_user)
noteable_update_service(note) &&
current_user &&
- current_user.can?(:"update_#{note.noteable_type.underscore}", note.noteable)
+ current_user.can?(:"update_#{note.to_ability_name}", note.noteable)
end
def supported?(note)