diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-20 13:28:40 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-25 12:10:05 +0300 |
commit | 0c350b79395d6712c7c4fee649cdbd77aa4052cc (patch) | |
tree | 2899a67fbe65c29b84c35ab417dbec96913095c4 /app/services/notes | |
parent | bf708e55c2e6035b64861a1cda8bfe3d3b4a2105 (diff) |
address comments
Diffstat (limited to 'app/services/notes')
-rw-r--r-- | app/services/notes/post_process_service.rb | 9 | ||||
-rw-r--r-- | app/services/notes/slash_commands_service.rb | 2 |
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) |