diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-01-30 02:14:39 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-05 18:58:20 +0100 |
commit | e2c8a2231bcc00e5993411e4ad6c0c0db7e1a297 (patch) | |
tree | a6323f1ed92d9d46f74b7f793651d1bff25cda3f /app/controllers/groups | |
parent | 04263b9f3be22bd97249162d9d3e27829c639d07 (diff) | |
download | gitlab-ce-e2c8a2231bcc00e5993411e4ad6c0c0db7e1a297.tar.gz |
Remove usage of VariablePresenter in controller
Diffstat (limited to 'app/controllers/groups')
-rw-r--r-- | app/controllers/groups/variables_controller.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/controllers/groups/variables_controller.rb b/app/controllers/groups/variables_controller.rb index 32c024d78fb..3e78711dabf 100644 --- a/app/controllers/groups/variables_controller.rb +++ b/app/controllers/groups/variables_controller.rb @@ -5,10 +5,7 @@ module Groups def show respond_to do |format| format.json do - variables = @group.variables - .map { |variable| variable.present(current_user: current_user) } - - render status: :ok, json: { variables: GroupVariableSerializer.new.represent(variables) } + render status: :ok, json: { variables: GroupVariableSerializer.new.represent(@group.variables) } end end end @@ -17,10 +14,7 @@ module Groups respond_to do |format| format.json do if @group.update(variables_params) - variables = @group.variables - .map { |variable| variable.present(current_user: current_user) } - - return render status: :ok, json: { variables: GroupVariableSerializer.new.represent(variables) } + return render status: :ok, json: { variables: GroupVariableSerializer.new.represent(@group.variables) } end render status: :bad_request, json: @group.errors.full_messages |