Sha256: 363842a714261818566452dc02f8c3691ce4bec1e46cc4ea812967ad85dd7bbd

Contents?: true

Size: 925 Bytes

Versions: 1

Compression:

Stored size: 925 Bytes

Contents

<script>
  import { inertia, Link } from '@inertiajs/svelte'
  import <%= inertia_component_name %> from './<%= inertia_component_name %>.svelte'

  export let <%= singular_table_name %>
  export let flash
</script>

<svelte:head>
  <title><%= human_name %> #{<%= singular_table_name %>.id}</title>
</svelte:head>

{#if flash.notice}
  <p class="notice">{flash.notice}</p>
{/if}

<h1><%= human_name %> #{<%= singular_table_name %>.id}</h1>

<<%= inertia_component_name %> {<%= singular_table_name %>} />

<div>
  <Link href={`<%= js_edit_resource_path %>`}>Edit this <%= human_name.downcase %></Link> |
  <Link href="<%= js_resources_path %>">Back to <%= human_name.pluralize.downcase %></Link>

  <br />

  <button
    use:inertia={{ href: `<%= js_resource_path %>`, method: 'delete' }}
    type="button"
  >
    Destroy this <%= human_name.downcase %>
  </button>
</div>

<style>
  .notice {
    color: green;
  }
</style>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
inertia_rails-3.5.0 lib/generators/inertia_templates/scaffold/templates/svelte4/Show.svelte.tt