diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-29 12:06:35 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-05 11:11:59 -0500 |
commit | fe13f110412d85c05dc68e5ee1db499f681bf722 (patch) | |
tree | 4a2d172bb5a490ac8cadbcf376fbf815393ef22b /app/serializers/pipeline_entity.rb | |
parent | dc7939337e0d72d2391c3bbb3082d644a54195af (diff) | |
download | gitlab-ce-fe13f110412d85c05dc68e5ee1db499f681bf722.tar.gz |
Create and use project path helpers that only need a project, no namespace
Diffstat (limited to 'app/serializers/pipeline_entity.rb')
-rw-r--r-- | app/serializers/pipeline_entity.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb index 6d1fd9d459f..c4f000b0ca3 100644 --- a/app/serializers/pipeline_entity.rb +++ b/app/serializers/pipeline_entity.rb @@ -10,10 +10,7 @@ class PipelineEntity < Grape::Entity expose :created_at, :updated_at expose :path do |pipeline| - namespace_project_pipeline_path( - pipeline.project.namespace, - pipeline.project, - pipeline) + project_pipeline_path(pipeline.project, pipeline) end expose :flags do @@ -48,15 +45,11 @@ class PipelineEntity < Grape::Entity expose :commit, using: CommitEntity expose :retry_path, if: -> (*) { can_retry? } do |pipeline| - retry_namespace_project_pipeline_path(pipeline.project.namespace, - pipeline.project, - pipeline.id) + retry_project_pipeline_path(pipeline.project, pipeline) end expose :cancel_path, if: -> (*) { can_cancel? } do |pipeline| - cancel_namespace_project_pipeline_path(pipeline.project.namespace, - pipeline.project, - pipeline.id) + cancel_project_pipeline_path(pipeline.project, pipeline) end expose :yaml_errors, if: -> (pipeline, _) { pipeline.has_yaml_errors? } |