div.database data-id=@database.id
  div.details
    p
      strong
        'Name:
      span.editable data-url="/databases/#{@database.id}" data-attribute='database[name]'
        = @database.name
      '
    p
      strong
        'Shareable Link:
        = link_to database_url(@database), database_url(@database), title: 'Share this URL to share access to your DB'

  div.tables
    ul.list
      li
        a#add-table = 'Add Table'
      - @database.tables.each do |table|
        li
          a data-id=table.id data-name=table.name
            = table.name

    div.table data-id=current_table.try(:id)
      p
        strong Name: 
        span.editable
          = @table.name
      p
        strong ID:
        = @table.id

      == render 'tables/table'

= link_to 'Edit this Database', edit_database_path(@database)

div.database data-id=@database.id
  div.details
    p
      strong
        'Name:
      span.editable data-url="/databases/#{@database.id}" data-attribute='database[name]'
        = @database.name
      '
    p
      strong
        'Shareable Link:
        = link_to database_url(@database), database_url(@database), title: 'Share this URL to share access to your DB'

  div.tables
    ul.list
      li
        a#add-table = 'Add Table'
      - @database.tables.each do |table|
        li
          a data-id=table.id data-name=table.name
            = table.name

    div.table data-id=current_table.try(:id)
      p
        strong Name: 
        span.editable
          = @table.name
      p
        strong ID:
        = @table.id

      == render 'tables/table'

== render 'columns/form'
= link_to 'Edit this Database', edit_database_path(@database)

Include column edit form on database view
Include column edit form on database view

boochtek/DynamicDB,boochtek/DynamicDB,boochtek/DynamicDB