   end
 
   def render(assigns) do
+    {module, function, args} = assigns.model.__schema__(:autogenerate_id)
+    tabs = ["Prefix",
+            "Autogenerated ID",
+            "Primary Keys",
+            "Redact Fields",
+            "(non virtual) Fields and Field Sources",
+            "Embedded Fields",
+            "Read after Write Fields"]
+
     ~H"""
     <div class="m-2 border border-gray rounded">
       <h2 class="p-1 border-b border-gray text-center bg-gradient-to-r from-gray-light via-gray-lighter to-gray-light font-mono">

# __schema__(:source) - Returns the source as given to schema/2;
# __schema__(:associations) - Returns a list of all association field names;
# __schema__(:association, assoc) - Returns the association reflection of the given assoc;
# __schema__(:embed, embed) - Returns the embedding reflection of the given embed;
# __schema__(:autogenerate_id) - Primary key that is auto generated on insert;
# __schema__(:redact_fields) - Re

        <span class="italic">{{ Naming.module_without_namespace(@model) }}</span>
      </h2>

      <div x-data="{ selectedTab: 0 }">
        <ul class="flex flex-wrap border-b border-gray bg-gradient-to-r from-gray-lightest via-gray-lighter to-gray-light">
          <li :for.with_index={{ {title, index} <- tabs }}
              class="-mb-px ml-1.5 mt-1">
            <a class="inline-block rounded-t px-1 border-gray"
              :class="{ 'disabled text-black bg-gray-lightest border-l border-t border-r':
                        selectedTab === {{ index }},
                        'bg-gray-light text-gray-dark hover:text-gray-darker': selectedTab !== {{ index }} }"
              @click.prevent="selectedTab = {{ index }}"
              to="#">{{ title }}</a>
          </li>
        </ul>
        <div class="p-4">
          <div x-show="selectedTab === 0">
            {{ @model.__schema__(:prefix) || "no prefix" }}
          </div>

          <table x-show="selectedTab === 1">
            <thead>
              <tr>
                <th><div class="bg-white mx-2">Module</div></th>
                <th><div class="bg-white mx-2">Function</div></th>
                <th><div class="bg-white mx-2">Arguments</div></th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td><div class="bg-gray-lighter">{{ module }}</div></td>
                <td><div class="bg-gray-lighter">{{ function }}</div></td>
                <td><div class="bg-gray-lighter">{{ args }}</div></td>
              </tr>
            </tbody>
          </table>

          <div x-show="selectedTab === 2"
              :for={{ key <- @model.__schema__(:primary_key) }}>
            {{ key |> Atom.to_string() }}
          </div>

          <div x-show="selectedTab === 3">
            <div :for={{ field <- @model.__schema__(:redact_fields) }}>
              {{ field |> Atom.to_string() }}
            </div>
            <div :if={{ @model.__schema__(:redact_fields) == [] }}>none</div>
          </div>

          <table x-show="selectedTab === 4">
            <thead>
              <tr>
                <th><div class="bg-white mx-1">Field</div></th>
                <th><div class="bg-white mx-1">Alias</div></th>
                <th><div class="bg-white mx-1">Type</div></th>
              </tr>
            </thead>
            <tbody>
              <tr :for.with_index={{ {field, index} <- @model.__schema__(:fields) }}>
                <td>
                  <div class={{ "mx-1",
                                "bg-white": Integer.is_odd(index),
                                "bg-gray-lighter": Integer.is_even(index) }}>
                    {{ field |> Atom.to_string() }}
                  </div>
                </td>
                <td>
                  <div class={{ "mx-1",
                                "bg-white": Integer.is_odd(index),
                                "bg-gray-lighter": Integer.is_even(index) }}>
                    {{ @model.__schema__(:field_source, field) |> Atom.to_string() }}
                  </div>
                </td>
                <td>
                  <div class={{ "mx-1",
                      "bg-white": Integer.is_odd(index),
                      "bg-gray-lighter": Integer.is_even(index) }}>
                    {{ @model.__schema__(:type, field) |> Atom.to_string() }}
                  </div>
                </td>
              </tr>
            </tbody>
          </table>

          <div x-show="selectedTab === 5">
            <div :for={{ field <- @model.__schema__(:embeds) }}
                class="ml-8">
              {{ field |> Atom.to_string() }}
            </div>
            <div :if={{ @model.__schema__(:embeds) == [] }}
                class="ml-8">
              none
            </div>
          </div>

          <div x-show="selectedTab === 6">
            <div :for={{ field <- @model.__schema__(:read_after_writes) }}
                class="ml-8">
              {{ field |> Atom.to_string() }}
            </div>
            <div :if={{ @model.__schema__(:read_after_writes) == [] }}
                class="ml-8">
              none
            </div>
          </div>
        </div>
      </div>
    </div>
    """
