Sha256: 146bdb3cf24f9fcf7bcc90ea0221b2d34c932c4082dc245990ed97677b5d20a1

Contents?: true

Size: 779 Bytes

Versions: 2

Compression:

Stored size: 779 Bytes

Contents

<script>
  let { <%= singular_table_name %> } = $props()
</script>

<div>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
  <p>
    <strong><%= 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

2 entries across 2 versions & 2 rubygems

Version Path
inertia_rails-3.5.0 lib/generators/inertia_templates/scaffold/templates/svelte/One.svelte.tt
inertia_rails-contrib-0.3.0 lib/generators/inertia_templates/scaffold/templates/svelte/One.svelte.tt