Sha256: 5de6df61f9eb6b788a920a3cac402311c4dfb69d51a9865164c86b2530528c71

Contents?: true

Size: 845 Bytes

Versions: 8

Compression:

Stored size: 845 Bytes

Contents

<template>
  <div>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
    <p>
      <strong><%= 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>
const { <%= singular_table_name %> } = defineProps(['<%= singular_table_name %>'])
</script>

Version data entries

8 entries across 8 versions & 2 rubygems

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