Refactor envs helper for clarity
This commit is contained in:
parent
db054bc166
commit
5051f65497
1 changed files with 3 additions and 3 deletions
|
@ -182,11 +182,11 @@ class Projects::EnvironmentsController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
def serialize_environments(request, response, nested = false)
|
||||
serializer = EnvironmentSerializer
|
||||
EnvironmentSerializer
|
||||
.new(project: @project, current_user: @current_user)
|
||||
.tap { |serializer| serializer.within_folders if nested }
|
||||
.with_pagination(request, response)
|
||||
serializer = serializer.within_folders if nested
|
||||
serializer.represent(@environments)
|
||||
.represent(@environments)
|
||||
end
|
||||
|
||||
def authorize_stop_environment!
|
||||
|
|
Loading…
Reference in a new issue