Sha256: 92f8dbea3f2f0ec00e8c1e3cabe55149df013f8bed9d1dfd9e4608486c632410

Contents?: true

Size: 981 Bytes

Versions: 1

Compression:

Stored size: 981 Bytes

Contents

<template>
  <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? -%>
      <a v-if="<%= singular_table_name %>.<%= attribute.column_name %>" :href="<%= singular_table_name %>.<%= attribute.column_name %>.url">
        {{ <%= singular_table_name %>.<%= attribute.column_name %>.filename }}
      </a>
    </p>
<% elsif attribute.attachments? -%>
    </p>
    <div v-for="file in <%= singular_table_name %>.<%= attribute.column_name %>">
      <a :href="file.url">{{ file.filename }}</a>
    </div>
<% else -%>
      {{ <%= singular_table_name %>.<%= attribute.column_name %> }}
    </p>
<% end -%>
<% end -%>
  </div>
</template>

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

const { <%= singular_table_name %> } = defineProps<{ <%= singular_table_name %>: <%= inertia_model_type %> }>()
</script>

Version data entries

1 entries across 1 versions & 1 rubygems

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