From 689eca0b0f35528fb4c17f74bdaa90331934e55d Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Wed, 7 Nov 2018 15:37:25 +0900 Subject: Revert "Revert add action column changes" This reverts commit 9c811566f85d18bc9eb4a85c6a343cf1bfa4fbd2. --- lib/api/deployments.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/api/deployments.rb') diff --git a/lib/api/deployments.rb b/lib/api/deployments.rb index 6747e2e5005..2fb8551543a 100644 --- a/lib/api/deployments.rb +++ b/lib/api/deployments.rb @@ -24,7 +24,7 @@ module API get ':id/deployments' do authorize! :read_deployment, user_project - present paginate(user_project.deployments.order(params[:order_by] => params[:sort])), with: Entities::Deployment + present paginate(user_project.deployments.deployed.order(params[:order_by] => params[:sort])), with: Entities::Deployment end # rubocop: enable CodeReuse/ActiveRecord @@ -38,7 +38,7 @@ module API get ':id/deployments/:deployment_id' do authorize! :read_deployment, user_project - deployment = user_project.deployments.find(params[:deployment_id]) + deployment = user_project.deployments.deployed.find(params[:deployment_id]) present deployment, with: Entities::Deployment end -- cgit v1.2.1