Commit d79c228558715e617726f656aaa2b355cb2657ec

Authored by Gabriela Navarro
1 parent eb1d516f
Exists in master

Fix renderization of json.

-To access the action go to /plugin/colab_integration

Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com>
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
controllers/colab_integration_plugin_controller.rb
1 class ColabIntegrationPluginController < ApplicationController 1 class ColabIntegrationPluginController < ApplicationController
2 def index 2 def index
3 - { 3 + render json: {
4 "total" => environment.profiles.count, 4 "total" => environment.profiles.count,
5 - "profiles" => [ 5 + "profiles" =>
6 environment.profiles.each do |profile| 6 environment.profiles.each do |profile|
7 profile.attr_to_json 7 profile.attr_to_json
8 end 8 end
9 - ]  
10 }.to_json 9 }.to_json
11 end 10 end
12 -end  
13 \ No newline at end of file 11 \ No newline at end of file
  12 +end