Class: DashApi::SchemaController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- DashApi::SchemaController
- Defined in:
- app/controllers/dash_api/schema_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 7 |
# File 'app/controllers/dash_api/schema_controller.rb', line 4 def index tables = DashApi::Schema.table_names render json: { data: tables } end |
#schema ⇒ Object
9 10 11 12 |
# File 'app/controllers/dash_api/schema_controller.rb', line 9 def schema schema = DashApi::Schema.db_schema render json: { data: schema } end |
#show ⇒ Object
14 15 16 17 |
# File 'app/controllers/dash_api/schema_controller.rb', line 14 def show table_schema = DashApi::Schema.table_schema(params[:table_name]) render json: { data: table_schema } end |