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