Sha256: 9852a19c8d242566d9922b18e54aae8d8b6f5730d3e71750c13f42502d8ac5a7
Contents?: true
Size: 494 Bytes
Versions: 4
Compression:
Stored size: 494 Bytes
Contents
require 'jsonapi-serializers' module ForestLiana class ApimapsController < ForestLiana::ApplicationController def index result = [] ActiveRecord::Base.connection.tables.map do |model_name| begin model = model_name.classify.constantize result << SchemaAdapter.new(model).perform rescue => error puts error.inspect end end render json: serialize_models(result, serializer: ApimapSerializer) end end end
Version data entries
4 entries across 4 versions & 1 rubygems