Class: ForestRails::ApimapsController
Instance Method Summary
collapse
#authenticate_user_from_jwt
Instance Method Details
#index ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/controllers/forest_rails/apimaps_controller.rb', line 3
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: result, each_serializer: ApimapSerializer,
adapter: :json_api
end
|