Sha256: 8b35876debe748fff4198f457e3225df5929d909e4fa7ef4766163b9402d3ee9
Contents?: true
Size: 712 Bytes
Versions: 1
Compression:
Stored size: 712 Bytes
Contents
<template> <Head title="New <%= human_name.downcase %>" /> <h1>New <%= human_name.downcase %></h1> <Form :<%= singular_table_name %>="<%= singular_table_name %>" submitText="Create <%= human_name %>" @onSubmit="handleSubmit" /> <br /> <div> <Link href="<%= js_resources_path %>">Back to <%= human_name.pluralize.downcase %></Link> </div> </template> <script setup> import { Head, Link } from '@inertiajs/vue3' import Form from './Form.vue' const { <%= singular_table_name %> } = defineProps(['<%= singular_table_name %>']) const handleSubmit = (form) => { form.transform((data) => ({ <%= singular_table_name %>: data })) form.post('<%= js_resources_path %>') } </script>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inertia_rails-3.5.0 | lib/generators/inertia_templates/scaffold/templates/vue/New.vue.tt |