Sha256: c6a16884044b8f5f66bcbae45782c43ed493e13430533a10ec86c5f60aec9ad4

Contents?: true

Size: 771 Bytes

Versions: 8

Compression:

Stored size: 771 Bytes

Contents

<script>
  export let <%= singular_table_name %>
</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

8 entries across 8 versions & 2 rubygems

Version Path
inertia_rails-3.6.0 lib/generators/inertia_templates/scaffold/templates/svelte4/One.svelte.tt
inertia_rails-3.5.0 lib/generators/inertia_templates/scaffold/templates/svelte4/One.svelte.tt
inertia_rails-contrib-0.3.0 lib/generators/inertia_templates/scaffold/templates/svelte4/One.svelte.tt
inertia_rails-contrib-0.2.2 lib/generators/inertia_templates/scaffold/templates/svelte/One.svelte.tt
inertia_rails-contrib-0.2.1 lib/generators/inertia_templates/scaffold/templates/svelte/One.svelte.tt
inertia_rails-contrib-0.2.0 lib/generators/inertia_templates/scaffold/templates/svelte/One.svelte.tt
inertia_rails-contrib-0.1.1 lib/generators/inertia_templates/scaffold/templates/svelte/One.svelte.tt
inertia_rails-contrib-0.1.0 lib/generators/inertia_templates/scaffold/templates/svelte/One.svelte.tt