Sha256: 731e2c505171e9fc3bae667d9a1596236cfeb896b6fdb7c38e3e2bee8bba8cdb

Contents?: true

Size: 912 Bytes

Versions: 1

Compression:

Stored size: 912 Bytes

Contents

<script lang="ts">
  import type { <%= inertia_model_type %> } from './types'

  export let <%= singular_table_name %>: <%= inertia_model_type %>
</script>

<div>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
  <p class="my-5">
    <strong class="block font-medium mb-1"><%= attribute.human_name %>:</strong>
<% if attribute.attachment? -%>
    {#if <%= singular_table_name %>.<%= attribute.column_name %>}
      <a href={<%= singular_table_name %>.<%= attribute.column_name %>.url}>
        {<%= singular_table_name %>.<%= attribute.column_name %>.filename}
      </a>
    {/if}
  </p>
<% elsif attribute.attachments? -%>
  </p>
  {#each <%= singular_table_name %>.<%= attribute.column_name %> as { url, filename }}
    <div>
      <a href={url}>{filename}</a>
    </div>
  {/each}
<% else -%>
    {<%= singular_table_name %>.<%= attribute.column_name %>}
  </p>
<% end -%>
<% end -%>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inertia_rails-3.5.0 lib/generators/inertia_tw_templates/scaffold/templates/svelte4/One.ts.svelte.tt