Class: Dbviewer::EntityRelationshipDiagramsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Dbviewer::EntityRelationshipDiagramsController
- Defined in:
- app/controllers/dbviewer/entity_relationship_diagrams_controller.rb
Instance Method Summary collapse
Methods included from DatabaseOperations
#available_connections, #current_connection_key, #database_manager, #fetch_database_analytics, #fetch_filtered_record_count, #fetch_table_columns, #fetch_table_metadata, #fetch_table_record_count, #fetch_table_records, #fetch_table_relationships, #fetch_tables, #get_adapter_name, #get_database_name, #safe_quote_table_name, #switch_connection, #table_query_operations
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/dbviewer/entity_relationship_diagrams_controller.rb', line 3 def index # Only show warning if no tables exist, but don't fetch relationships on initial load if @tables.blank? flash.now[:warning] = "No tables found in database to generate ERD." end respond_to do |format| format.html # Just render the HTML without relationships format.json do # For JSON requests, return just tables initially render json: { tables: @tables, relationships: [] } end end end |