From fc9e57434c57c8ebd36e7f038cf7535422e893e9 Mon Sep 17 00:00:00 2001 From: Jarka Kadlecova Date: Fri, 11 Aug 2017 13:53:51 +0200 Subject: [PATCH] Fix failing static-analysis (rubocop) --- app/helpers/issuables_helper.rb | 2 +- app/serializers/issue_entity.rb | 2 +- app/serializers/note_entity.rb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 4a3a03d0bfb..afcf1a467c5 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -213,7 +213,7 @@ module IssuablesHelper initialTitleText: issuable.title, initialDescriptionHtml: markdown_field(issuable, :description), initialDescriptionText: issuable.description, - initialTaskStatus: issuable.task_status, + initialTaskStatus: issuable.task_status } data.merge!(updated_at_by(issuable)) diff --git a/app/serializers/issue_entity.rb b/app/serializers/issue_entity.rb index fbdd9f94763..0d6feb78173 100644 --- a/app/serializers/issue_entity.rb +++ b/app/serializers/issue_entity.rb @@ -23,7 +23,7 @@ class IssueEntity < IssuableEntity end expose :create_note_path do |issue| - namespace_project_notes_path(issue.project.namespace, issue.project, target_type: 'issue', target_id: issue.id) + project_notes_path(issue.project, target_type: 'issue', target_id: issue.id) end expose :preview_note_path do |issue| diff --git a/app/serializers/note_entity.rb b/app/serializers/note_entity.rb index 53b3ed41940..f84343aa71a 100644 --- a/app/serializers/note_entity.rb +++ b/app/serializers/note_entity.rb @@ -37,7 +37,7 @@ class NoteEntity < API::Entities::Note if note.for_personal_snippet? toggle_award_emoji_snippet_note_path(note.noteable, note) else - toggle_award_emoji_namespace_project_note_path(note.project.namespace, note.project, note.id) + toggle_award_emoji_project_note_path(note.project, note.id) end end @@ -49,12 +49,12 @@ class NoteEntity < API::Entities::Note if note.for_personal_snippet? snippet_note_path(note.noteable, note) else - namespace_project_note_path(note.project.namespace, note.project, note) + project_note_path(note.project, note) end end expose :attachment, using: NoteAttachmentEntity expose :delete_attachment_path, if: -> (note, _) { note.attachment? } do |note| - delete_attachment_namespace_project_note_path(note.project.namespace, note.project, note) + delete_attachment_project_note_path(note.project, note) end end