class ColabIntegrationPluginController < ApplicationController def index data = { "total" => environment.profiles.count, "profiles" => [] } environment.profiles.each do |profile| data["profiles"] << profile.attr_to_json end render json: data.to_json end end