diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2018-11-27 16:47:10 +0800 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-12-19 17:58:53 +0800 |
commit | 6c79e9307e116d6115f6d76ac796176952fb83cd (patch) | |
tree | 85a2981cf3451e9c3918e894b488d3b9fec6337d /app/helpers/issuables_helper.rb | |
parent | 1f7c072e08913dda0534bc5534a50f389567433f (diff) | |
download | gitlab-ce-6c79e9307e116d6115f6d76ac796176952fb83cd.tar.gz |
Refactor issuable sidebar to have extras option
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r-- | app/helpers/issuables_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index da991458ea7..ea861bd2fc4 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -50,13 +50,13 @@ module IssuablesHelper end end - def issuable_json_path(issuable) + def issuable_json_path(issuable, url_params = {}) project = issuable.project if issuable.is_a?(MergeRequest) - project_merge_request_path(project, issuable.iid, :json) + project_merge_request_path(project, issuable.iid, :json, url_params) else - project_issue_path(project, issuable.iid, :json) + project_issue_path(project, issuable.iid, :json, url_params) end end @@ -420,7 +420,7 @@ module IssuablesHelper def issuable_sidebar_options(issuable, can_edit_issuable) { - endpoint: "#{issuable_json_path(issuable)}?serializer=sidebar", + endpoint: issuable_json_path(issuable, serializer: 'sidebar_extras'), toggleSubscriptionEndpoint: toggle_subscription_path(issuable), moveIssueEndpoint: move_namespace_project_issue_path(namespace_id: issuable.project.namespace.to_param, project_id: issuable.project, id: issuable), projectsAutocompleteEndpoint: autocomplete_projects_path(project_id: @project.id), |