inertia_rails 3.12.1 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/generators/inertia/controller/templates/controller.rb.tt +1 -1
- data/lib/generators/inertia/install/frameworks.yml +16 -36
- data/lib/generators/inertia/install/install_generator.rb +51 -8
- data/lib/generators/inertia/install/js_package_manager.rb +6 -6
- data/lib/generators/inertia/install/templates/controller.rb +2 -4
- data/lib/generators/inertia/install/templates/inertia_controller.rb +5 -0
- data/lib/generators/inertia/install/templates/react/InertiaExample.jsx +2 -2
- data/lib/generators/inertia/install/templates/react/InertiaExample.tsx +2 -2
- data/lib/generators/inertia/install/templates/react/inertia.jsx +65 -0
- data/lib/generators/inertia/install/templates/react/inertia.tsx +65 -0
- data/lib/generators/inertia/install/templates/react/tsconfig.app.json +7 -0
- data/lib/generators/inertia/install/templates/react/types/globals.d.ts +8 -0
- data/lib/generators/inertia/install/templates/react/types/index.ts +8 -0
- data/lib/generators/inertia/install/templates/svelte/InertiaExample.svelte +1 -1
- data/lib/generators/inertia/install/templates/svelte/InertiaExample.ts.svelte +1 -1
- data/lib/generators/inertia/install/templates/svelte/inertia.js +14 -3
- data/lib/generators/inertia/install/templates/svelte/{inertia.ts.tt → inertia.ts} +12 -2
- data/lib/generators/inertia/install/templates/svelte/tsconfig.json +8 -0
- data/lib/generators/inertia/install/templates/svelte/types/globals.d.ts +8 -0
- data/lib/generators/inertia/install/templates/svelte/types/index.ts +8 -0
- data/lib/generators/inertia/install/templates/tailwind/application.css +3 -3
- data/lib/generators/inertia/install/templates/vue/InertiaExample.ts.vue +1 -1
- data/lib/generators/inertia/install/templates/vue/InertiaExample.vue +1 -1
- data/lib/generators/inertia/install/templates/vue/inertia.js +30 -3
- data/lib/generators/inertia/install/templates/vue/inertia.ts +31 -3
- data/lib/generators/inertia/install/templates/vue/tsconfig.app.json +9 -1
- data/lib/generators/inertia/install/templates/vue/types/globals.d.ts +8 -0
- data/lib/generators/inertia/install/templates/vue/types/index.ts +8 -0
- data/lib/generators/inertia/scaffold_controller/scaffold_controller_generator.rb +4 -0
- data/lib/generators/inertia/scaffold_controller/templates/controller.rb.tt +7 -5
- data/lib/generators/inertia_templates/scaffold/templates/react/{Edit.jsx.tt → edit.jsx.tt} +5 -8
- data/lib/generators/inertia_templates/scaffold/templates/react/{Edit.tsx.tt → edit.tsx.tt} +7 -9
- data/lib/generators/inertia_templates/scaffold/templates/react/form.jsx.tt +94 -0
- data/lib/generators/inertia_templates/scaffold/templates/react/form.tsx.tt +109 -0
- data/lib/generators/inertia_templates/scaffold/templates/react/{Index.jsx.tt → index.jsx.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/react/{Index.tsx.tt → index.tsx.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/react/{New.jsx.tt → new.jsx.tt} +3 -5
- data/lib/generators/inertia_templates/scaffold/templates/react/{New.tsx.tt → new.tsx.tt} +5 -6
- data/lib/generators/inertia_templates/scaffold/templates/react/{Show.jsx.tt → show.jsx.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/react/{Show.tsx.tt → show.tsx.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/svelte/{Edit.svelte.tt → edit.svelte.tt} +9 -13
- data/lib/generators/inertia_templates/scaffold/templates/{svelte4/Edit.svelte.tt → svelte/edit.ts.svelte.tt} +11 -15
- data/lib/generators/inertia_templates/scaffold/templates/svelte/form.svelte.tt +96 -0
- data/lib/generators/inertia_templates/scaffold/templates/svelte/form.ts.svelte.tt +103 -0
- data/lib/generators/inertia_templates/scaffold/templates/svelte/{Index.svelte.tt → index.svelte.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/svelte/{Index.ts.svelte.tt → index.ts.svelte.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/svelte/{New.svelte.tt → new.svelte.tt} +4 -7
- data/lib/generators/inertia_templates/scaffold/templates/{svelte4/New.svelte.tt → svelte/new.ts.svelte.tt} +6 -9
- data/lib/generators/inertia_templates/scaffold/templates/svelte/{Show.svelte.tt → show.svelte.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/svelte/{Show.ts.svelte.tt → show.ts.svelte.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/vue/{Edit.ts.vue.tt → edit.ts.vue.tt} +11 -15
- data/lib/generators/inertia_templates/scaffold/templates/vue/{Edit.vue.tt → edit.vue.tt} +9 -13
- data/lib/generators/inertia_templates/scaffold/templates/vue/form.ts.vue.tt +102 -0
- data/lib/generators/inertia_templates/scaffold/templates/vue/form.vue.tt +98 -0
- data/lib/generators/inertia_templates/scaffold/templates/vue/{Index.ts.vue.tt → index.ts.vue.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/vue/{Index.vue.tt → index.vue.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/vue/{New.ts.vue.tt → new.ts.vue.tt} +6 -9
- data/lib/generators/inertia_templates/scaffold/templates/vue/{New.vue.tt → new.vue.tt} +4 -7
- data/lib/generators/inertia_templates/scaffold/templates/vue/{Show.ts.vue.tt → show.ts.vue.tt} +1 -1
- data/lib/generators/inertia_templates/scaffold/templates/vue/{Show.vue.tt → show.vue.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/{Edit.jsx.tt → edit.jsx.tt} +5 -8
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/{Edit.tsx.tt → edit.tsx.tt} +6 -9
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/form.jsx.tt +106 -0
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/form.tsx.tt +122 -0
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/{Index.jsx.tt → index.jsx.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/{Index.tsx.tt → index.tsx.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/{New.jsx.tt → new.jsx.tt} +3 -5
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/{New.tsx.tt → new.tsx.tt} +4 -6
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/{Show.jsx.tt → show.jsx.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/{Show.tsx.tt → show.tsx.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{Edit.svelte.tt → edit.svelte.tt} +9 -13
- data/lib/generators/inertia_tw_templates/scaffold/templates/{svelte4/Edit.svelte.tt → svelte/edit.ts.svelte.tt} +11 -15
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/form.svelte.tt +109 -0
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/form.ts.svelte.tt +115 -0
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{Index.svelte.tt → index.svelte.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{Index.ts.svelte.tt → index.ts.svelte.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{New.svelte.tt → new.svelte.tt} +4 -6
- data/lib/generators/inertia_tw_templates/scaffold/templates/{svelte4/New.svelte.tt → svelte/new.ts.svelte.tt} +6 -9
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{Show.svelte.tt → show.svelte.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{Show.ts.svelte.tt → show.ts.svelte.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Edit.ts.vue.tt → edit.ts.vue.tt} +10 -15
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Edit.vue.tt → edit.vue.tt} +8 -13
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Form.ts.vue.tt → form.ts.vue.tt} +19 -42
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Form.vue.tt → form.vue.tt} +18 -38
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Index.ts.vue.tt → index.ts.vue.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Index.vue.tt → index.vue.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{New.ts.vue.tt → new.ts.vue.tt} +6 -9
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{New.vue.tt → new.vue.tt} +4 -7
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Show.ts.vue.tt → show.ts.vue.tt} +1 -1
- data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Show.vue.tt → show.vue.tt} +1 -1
- data/lib/inertia_rails/generators/controller_template_base.rb +1 -1
- data/lib/inertia_rails/generators/helper.rb +2 -3
- data/lib/inertia_rails/generators/scaffold_template_base.rb +3 -3
- data/lib/inertia_rails/version.rb +1 -1
- metadata +87 -116
- data/lib/generators/inertia/install/templates/react/inertia.js +0 -45
- data/lib/generators/inertia/install/templates/react/inertia.ts +0 -51
- data/lib/generators/inertia/install/templates/svelte4/InertiaExample.svelte +0 -116
- data/lib/generators/inertia/install/templates/svelte4/InertiaExample.ts.svelte +0 -116
- data/lib/generators/inertia/install/templates/svelte4/inertia.js +0 -43
- data/lib/generators/inertia/install/templates/svelte4/inertia.ts.tt +0 -44
- data/lib/generators/inertia/install/templates/svelte4/svelte.config.js +0 -7
- data/lib/generators/inertia/install/templates/svelte4/tsconfig.json +0 -21
- data/lib/generators/inertia/install/templates/svelte4/tsconfig.node.json +0 -12
- data/lib/generators/inertia/install/templates/svelte4/vite-env.d.ts +0 -2
- data/lib/generators/inertia_templates/controller/templates/svelte4/view.svelte.tt +0 -2
- data/lib/generators/inertia_templates/scaffold/templates/react/Form.jsx.tt +0 -111
- data/lib/generators/inertia_templates/scaffold/templates/react/Form.tsx.tt +0 -130
- data/lib/generators/inertia_templates/scaffold/templates/svelte/Edit.ts.svelte.tt +0 -37
- data/lib/generators/inertia_templates/scaffold/templates/svelte/Form.svelte.tt +0 -97
- data/lib/generators/inertia_templates/scaffold/templates/svelte/Form.ts.svelte.tt +0 -102
- data/lib/generators/inertia_templates/scaffold/templates/svelte/New.ts.svelte.tt +0 -30
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/Edit.ts.svelte.tt +0 -38
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/Form.svelte.tt +0 -96
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/Form.ts.svelte.tt +0 -106
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/Index.svelte.tt +0 -36
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/Index.ts.svelte.tt +0 -37
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/New.ts.svelte.tt +0 -31
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/One.svelte.tt +0 -28
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/One.ts.svelte.tt +0 -30
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/Show.svelte.tt +0 -39
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/Show.ts.svelte.tt +0 -40
- data/lib/generators/inertia_templates/scaffold/templates/svelte4/types.ts.tt +0 -19
- data/lib/generators/inertia_templates/scaffold/templates/vue/Form.ts.vue.tt +0 -101
- data/lib/generators/inertia_templates/scaffold/templates/vue/Form.vue.tt +0 -94
- data/lib/generators/inertia_tw_templates/controller/templates/svelte4/view.svelte.tt +0 -2
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/Form.jsx.tt +0 -122
- data/lib/generators/inertia_tw_templates/scaffold/templates/react/Form.tsx.tt +0 -142
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/Edit.ts.svelte.tt +0 -45
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/Form.svelte.tt +0 -118
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/Form.ts.svelte.tt +0 -123
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/New.ts.svelte.tt +0 -33
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/Edit.ts.svelte.tt +0 -46
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/Form.svelte.tt +0 -120
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/Form.ts.svelte.tt +0 -130
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/Index.svelte.tt +0 -43
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/Index.ts.svelte.tt +0 -44
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/New.ts.svelte.tt +0 -34
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/One.svelte.tt +0 -28
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/One.ts.svelte.tt +0 -30
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/Show.svelte.tt +0 -51
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/Show.ts.svelte.tt +0 -52
- data/lib/generators/inertia_tw_templates/scaffold/templates/svelte4/types.ts.tt +0 -19
- /data/lib/generators/inertia/install/templates/react/{vite-env.d.ts → types/vite-env.d.ts} +0 -0
- /data/lib/generators/inertia/install/templates/svelte/{vite-env.d.ts → types/vite-env.d.ts} +0 -0
- /data/lib/generators/inertia/install/templates/vue/{vite-env.d.ts → types/vite-env.d.ts} +0 -0
- /data/lib/generators/inertia_templates/scaffold/templates/react/{One.jsx.tt → one.jsx.tt} +0 -0
- /data/lib/generators/inertia_templates/scaffold/templates/react/{One.tsx.tt → one.tsx.tt} +0 -0
- /data/lib/generators/inertia_templates/scaffold/templates/svelte/{One.svelte.tt → one.svelte.tt} +0 -0
- /data/lib/generators/inertia_templates/scaffold/templates/svelte/{One.ts.svelte.tt → one.ts.svelte.tt} +0 -0
- /data/lib/generators/inertia_templates/scaffold/templates/vue/{One.ts.vue.tt → one.ts.vue.tt} +0 -0
- /data/lib/generators/inertia_templates/scaffold/templates/vue/{One.vue.tt → one.vue.tt} +0 -0
- /data/lib/generators/inertia_tw_templates/scaffold/templates/react/{One.jsx.tt → one.jsx.tt} +0 -0
- /data/lib/generators/inertia_tw_templates/scaffold/templates/react/{One.tsx.tt → one.tsx.tt} +0 -0
- /data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{One.svelte.tt → one.svelte.tt} +0 -0
- /data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{One.ts.svelte.tt → one.ts.svelte.tt} +0 -0
- /data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{One.ts.vue.tt → one.ts.vue.tt} +0 -0
- /data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{One.vue.tt → one.vue.tt} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { Link } from '@inertiajs/svelte'
|
|
3
|
-
import <%= inertia_component_name %> from './<%=
|
|
3
|
+
import <%= inertia_component_name %> from './<%= singular_name %>.svelte'
|
|
4
4
|
|
|
5
5
|
let { <%= plural_table_name %>, flash } = $props()
|
|
6
6
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Link } from '@inertiajs/svelte'
|
|
3
|
-
import <%= inertia_component_name %> from './<%=
|
|
3
|
+
import <%= inertia_component_name %> from './<%= singular_name %>.svelte'
|
|
4
4
|
import type { <%= inertia_model_type %> } from './types'
|
|
5
5
|
|
|
6
6
|
let { <%= plural_table_name %>, flash } = $props<{
|
data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{New.svelte.tt → new.svelte.tt}
RENAMED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { Link } from '@inertiajs/svelte'
|
|
3
|
-
import Form from './Form.svelte'
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
import Form from './form.svelte'
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
form.transform((data) => ({ <%= singular_table_name %>: data }))
|
|
9
|
-
form.post('<%= js_resources_path %>')
|
|
10
|
-
}
|
|
6
|
+
let { <%= singular_table_name %> } = $props()
|
|
11
7
|
</script>
|
|
12
8
|
|
|
13
9
|
<svelte:head>
|
|
@@ -21,6 +17,8 @@
|
|
|
21
17
|
{<%= singular_table_name %>}
|
|
22
18
|
submitText="Create <%= human_name %>"
|
|
23
19
|
onSubmit={handleSubmit}
|
|
20
|
+
action="<%= js_resource_path %>"
|
|
21
|
+
method="post"
|
|
24
22
|
/>
|
|
25
23
|
|
|
26
24
|
<Link
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script lang="ts">
|
|
2
2
|
import { Link } from '@inertiajs/svelte'
|
|
3
|
-
import Form from './Form.svelte'
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
import type { <%= inertia_model_type %> } from './types'
|
|
5
|
+
import Form from './form.svelte'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
const { form } = e.detail
|
|
9
|
-
form.transform((data) => ({ <%= singular_table_name %>: data }))
|
|
10
|
-
form.post('<%= js_resources_path %>')
|
|
11
|
-
}
|
|
7
|
+
let { <%= singular_table_name %> } = $props<{ <%= singular_table_name %>: <%= inertia_model_type %> }>()
|
|
12
8
|
</script>
|
|
13
9
|
|
|
14
10
|
<svelte:head>
|
|
@@ -21,7 +17,8 @@
|
|
|
21
17
|
<Form
|
|
22
18
|
{<%= singular_table_name %>}
|
|
23
19
|
submitText="Create <%= human_name %>"
|
|
24
|
-
|
|
20
|
+
action="<%= js_resource_path %>"
|
|
21
|
+
method="post"
|
|
25
22
|
/>
|
|
26
23
|
|
|
27
24
|
<Link
|
data/lib/generators/inertia_tw_templates/scaffold/templates/svelte/{Show.svelte.tt → show.svelte.tt}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { Link } from '@inertiajs/svelte'
|
|
3
|
-
import <%= inertia_component_name %> from './<%=
|
|
3
|
+
import <%= inertia_component_name %> from './<%= singular_name %>.svelte'
|
|
4
4
|
|
|
5
5
|
let { <%= singular_table_name %>, flash } = $props()
|
|
6
6
|
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Link } from '@inertiajs/svelte'
|
|
3
|
-
import <%= inertia_component_name %> from './<%=
|
|
3
|
+
import <%= inertia_component_name %> from './<%= singular_name %>.svelte'
|
|
4
4
|
import type { <%= inertia_model_type %> } from './types'
|
|
5
5
|
|
|
6
6
|
let { <%= singular_table_name %>, flash } = $props<{
|
data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Edit.ts.vue.tt → edit.ts.vue.tt}
RENAMED
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
<Form
|
|
8
8
|
:<%= singular_table_name %>="<%= singular_table_name %>"
|
|
9
9
|
submitText="Update <%= human_name %>"
|
|
10
|
-
|
|
10
|
+
:action="`<%= js_resource_path %>`"
|
|
11
|
+
<% if attributes.any?(&:attachments?) -%>
|
|
12
|
+
method="post"
|
|
13
|
+
:headers="{ 'X-HTTP-METHOD-OVERRIDE': 'patch' }"
|
|
14
|
+
<% else -%>
|
|
15
|
+
method="patch"
|
|
16
|
+
<% end -%>
|
|
11
17
|
/>
|
|
12
18
|
|
|
13
19
|
<Link
|
|
@@ -26,20 +32,9 @@
|
|
|
26
32
|
</template>
|
|
27
33
|
|
|
28
34
|
<script setup lang="ts">
|
|
29
|
-
import { Head,
|
|
30
|
-
import Form from './
|
|
31
|
-
import { <%=
|
|
35
|
+
import { Head, Link } from '@inertiajs/vue3'
|
|
36
|
+
import Form from './form.vue'
|
|
37
|
+
import type { <%= inertia_model_type %> } from './types'
|
|
32
38
|
|
|
33
39
|
const { <%= singular_table_name %> } = defineProps<{ <%= singular_table_name %>: <%= inertia_model_type %> }>()
|
|
34
|
-
|
|
35
|
-
const handleSubmit = (form: InertiaForm<<%= inertia_model_form_type %>>) => {
|
|
36
|
-
form.transform((data) => ({ <%= singular_table_name %>: data }))
|
|
37
|
-
<% if attributes.any?(&:attachments?) -%>
|
|
38
|
-
form.post(`<%= js_resource_path %>`, {
|
|
39
|
-
headers: { 'X-HTTP-METHOD-OVERRIDE': 'put' },
|
|
40
|
-
})
|
|
41
|
-
<% else -%>
|
|
42
|
-
form.patch(`<%= js_resource_path %>`)
|
|
43
|
-
<% end -%>
|
|
44
|
-
}
|
|
45
40
|
</script>
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
<Form
|
|
8
8
|
:<%= singular_table_name %>="<%= singular_table_name %>"
|
|
9
9
|
submitText="Update <%= human_name %>"
|
|
10
|
-
|
|
10
|
+
:action="`<%= js_resource_path %>`"
|
|
11
|
+
<% if attributes.any?(&:attachments?) -%>
|
|
12
|
+
method="post"
|
|
13
|
+
:headers="{ 'X-HTTP-METHOD-OVERRIDE': 'patch' }"
|
|
14
|
+
<% else -%>
|
|
15
|
+
method="patch"
|
|
16
|
+
<% end -%>
|
|
11
17
|
/>
|
|
12
18
|
|
|
13
19
|
<Link
|
|
@@ -27,18 +33,7 @@
|
|
|
27
33
|
|
|
28
34
|
<script setup>
|
|
29
35
|
import { Head, Link } from '@inertiajs/vue3'
|
|
30
|
-
import Form from './
|
|
36
|
+
import Form from './form.vue'
|
|
31
37
|
|
|
32
38
|
const { <%= singular_table_name %> } = defineProps(['<%= singular_table_name %>'])
|
|
33
|
-
|
|
34
|
-
const handleSubmit = (form) => {
|
|
35
|
-
form.transform((data) => ({ <%= singular_table_name %>: data }))
|
|
36
|
-
<% if attributes.any?(&:attachments?) -%>
|
|
37
|
-
form.post(`<%= js_resource_path %>`, {
|
|
38
|
-
headers: { 'X-HTTP-METHOD-OVERRIDE': 'put' },
|
|
39
|
-
})
|
|
40
|
-
<% else -%>
|
|
41
|
-
form.patch(`<%= js_resource_path %>`)
|
|
42
|
-
<% end -%>
|
|
43
|
-
}
|
|
44
39
|
</script>
|
data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Form.ts.vue.tt → form.ts.vue.tt}
RENAMED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<Form
|
|
3
|
+
class="contents"
|
|
4
|
+
:transform="data => ({ <%= singular_table_name %>: data })"
|
|
5
|
+
v-slot="{ processing, errors }"
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
>
|
|
3
8
|
<% attributes.each do |attribute| -%>
|
|
4
9
|
<% if attribute.password_digest? -%>
|
|
5
10
|
<div class="my-5">
|
|
@@ -8,14 +13,13 @@
|
|
|
8
13
|
type="password"
|
|
9
14
|
name="password"
|
|
10
15
|
id="password"
|
|
11
|
-
v-model="form.password"
|
|
12
16
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
13
17
|
/>
|
|
14
18
|
<div
|
|
15
|
-
v-if="
|
|
19
|
+
v-if="errors.password"
|
|
16
20
|
class="text-red-500 px-3 py-2 font-medium"
|
|
17
21
|
>
|
|
18
|
-
{{
|
|
22
|
+
{{ errors.password }}
|
|
19
23
|
</div>
|
|
20
24
|
</div>
|
|
21
25
|
|
|
@@ -25,14 +29,13 @@
|
|
|
25
29
|
type="password"
|
|
26
30
|
name="password_confirmation"
|
|
27
31
|
id="password_confirmation"
|
|
28
|
-
v-model="form.password_confirmation"
|
|
29
32
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
30
33
|
/>
|
|
31
34
|
<div
|
|
32
|
-
v-if="
|
|
35
|
+
v-if="errors.password_confirmation"
|
|
33
36
|
class="text-red-500 px-3 py-2 font-medium"
|
|
34
37
|
>
|
|
35
|
-
{{
|
|
38
|
+
{{ errors.password_confirmation }}
|
|
36
39
|
</div>
|
|
37
40
|
</div>
|
|
38
41
|
<% else -%>
|
|
@@ -42,7 +45,7 @@
|
|
|
42
45
|
<textarea
|
|
43
46
|
name="<%= attribute.singular_name %>"
|
|
44
47
|
id="<%= attribute.singular_name %>"
|
|
45
|
-
|
|
48
|
+
:value="<%= singular_table_name %>.<%= attribute.column_name %>"
|
|
46
49
|
rows="4"
|
|
47
50
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
48
51
|
/>
|
|
@@ -51,7 +54,6 @@
|
|
|
51
54
|
type="file"
|
|
52
55
|
name="<%= attribute.singular_name %>"
|
|
53
56
|
id="<%= attribute.singular_name %>"
|
|
54
|
-
@input="form.<%= attribute.column_name %> = (($event.target as HTMLInputElement).files || [])[0]"
|
|
55
57
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
56
58
|
/>
|
|
57
59
|
<% elsif attribute.attachments? -%>
|
|
@@ -60,7 +62,6 @@
|
|
|
60
62
|
multiple
|
|
61
63
|
name="<%= attribute.singular_name %>[]"
|
|
62
64
|
id="<%= attribute.singular_name %>"
|
|
63
|
-
@input="form.<%= attribute.column_name %> = Array.from(($event.target as HTMLInputElement).files || [])"
|
|
64
65
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
65
66
|
/>
|
|
66
67
|
<% elsif input_type(attribute) == "checkbox" -%>
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
type="<%= input_type(attribute) %>"
|
|
69
70
|
name="<%= attribute.singular_name %>"
|
|
70
71
|
id="<%= attribute.singular_name %>"
|
|
71
|
-
|
|
72
|
+
:checked="<%= singular_table_name %>.<%= attribute.column_name %>"
|
|
72
73
|
class="block mt-2 h-5 w-5"
|
|
73
74
|
/>
|
|
74
75
|
<% else -%>
|
|
@@ -76,12 +77,12 @@
|
|
|
76
77
|
type="<%= input_type(attribute) %>"
|
|
77
78
|
name="<%= attribute.singular_name %>"
|
|
78
79
|
id="<%= attribute.singular_name %>"
|
|
79
|
-
|
|
80
|
+
:value="<%= singular_table_name %>.<%= attribute.column_name %>"
|
|
80
81
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
81
82
|
/>
|
|
82
83
|
<% end -%>
|
|
83
|
-
<div v-if="
|
|
84
|
-
{{
|
|
84
|
+
<div v-if="errors.<%= attribute.column_name %>" class="text-red-500 px-3 py-2 font-medium">
|
|
85
|
+
{{ errors.<%= attribute.column_name %> }}
|
|
85
86
|
</div>
|
|
86
87
|
</div>
|
|
87
88
|
<% end -%>
|
|
@@ -90,45 +91,21 @@
|
|
|
90
91
|
<div class="inline">
|
|
91
92
|
<button
|
|
92
93
|
type="submit"
|
|
93
|
-
:disabled="
|
|
94
|
+
:disabled="processing"
|
|
94
95
|
class="rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer"
|
|
95
96
|
>
|
|
96
97
|
{{ submitText }}
|
|
97
98
|
</button>
|
|
98
99
|
</div>
|
|
99
|
-
</
|
|
100
|
+
</Form>
|
|
100
101
|
</template>
|
|
101
102
|
|
|
102
103
|
<script setup lang="ts">
|
|
103
|
-
import {
|
|
104
|
-
import { <%=
|
|
104
|
+
import { Form } from '@inertiajs/vue3'
|
|
105
|
+
import { <%= inertia_model_type %> } from './types'
|
|
105
106
|
|
|
106
107
|
const { <%= singular_table_name %>, submitText } = defineProps<{
|
|
107
108
|
<%= singular_table_name %>: <%= inertia_model_type %>
|
|
108
109
|
submitText: string
|
|
109
110
|
}>()
|
|
110
|
-
|
|
111
|
-
const emit = defineEmits<{
|
|
112
|
-
onSubmit: [form: InertiaForm<<%= inertia_model_form_type %>>]
|
|
113
|
-
}>()
|
|
114
|
-
|
|
115
|
-
const form = useForm<<%= inertia_model_form_type %>>({
|
|
116
|
-
<% attributes.reject { |a| a.attachment? || a.attachments? }.each do |attribute| -%>
|
|
117
|
-
<% if attribute.password_digest? -%>
|
|
118
|
-
password: '',
|
|
119
|
-
password_confirmation: '',
|
|
120
|
-
<% else -%>
|
|
121
|
-
<%= attribute.column_name %>: <%= singular_table_name %>.<%= attribute.column_name %>,
|
|
122
|
-
<% end -%>
|
|
123
|
-
<% end -%>
|
|
124
|
-
})
|
|
125
111
|
</script>
|
|
126
|
-
|
|
127
|
-
<style module>
|
|
128
|
-
.label {
|
|
129
|
-
display: block;
|
|
130
|
-
}
|
|
131
|
-
.error {
|
|
132
|
-
color: red;
|
|
133
|
-
}
|
|
134
|
-
</style>
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<Form
|
|
3
|
+
class="contents"
|
|
4
|
+
:transform="data => ({ <%= singular_table_name %>: data })"
|
|
5
|
+
v-slot="{ processing, errors }"
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
>
|
|
3
8
|
<% attributes.each do |attribute| -%>
|
|
4
9
|
<% if attribute.password_digest? -%>
|
|
5
10
|
<div class="my-5">
|
|
@@ -8,14 +13,13 @@
|
|
|
8
13
|
type="password"
|
|
9
14
|
name="password"
|
|
10
15
|
id="password"
|
|
11
|
-
v-model="form.password"
|
|
12
16
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
13
17
|
/>
|
|
14
18
|
<div
|
|
15
|
-
v-if="
|
|
19
|
+
v-if="errors.password"
|
|
16
20
|
class="text-red-500 px-3 py-2 font-medium"
|
|
17
21
|
>
|
|
18
|
-
{{
|
|
22
|
+
{{ errors.password.join(', ') }}
|
|
19
23
|
</div>
|
|
20
24
|
</div>
|
|
21
25
|
|
|
@@ -25,14 +29,13 @@
|
|
|
25
29
|
type="password"
|
|
26
30
|
name="password_confirmation"
|
|
27
31
|
id="password_confirmation"
|
|
28
|
-
v-model="form.password_confirmation"
|
|
29
32
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
30
33
|
/>
|
|
31
34
|
<div
|
|
32
|
-
v-if="
|
|
35
|
+
v-if="errors.password_confirmation"
|
|
33
36
|
class="text-red-500 px-3 py-2 font-medium"
|
|
34
37
|
>
|
|
35
|
-
{{
|
|
38
|
+
{{ errors.password_confirmation.join(', ') }}
|
|
36
39
|
</div>
|
|
37
40
|
</div>
|
|
38
41
|
<% else -%>
|
|
@@ -42,7 +45,7 @@
|
|
|
42
45
|
<textarea
|
|
43
46
|
name="<%= attribute.singular_name %>"
|
|
44
47
|
id="<%= attribute.singular_name %>"
|
|
45
|
-
|
|
48
|
+
:value="<%= singular_table_name %>.<%= attribute.column_name %>"
|
|
46
49
|
rows="4"
|
|
47
50
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
48
51
|
/>
|
|
@@ -51,7 +54,6 @@
|
|
|
51
54
|
type="file"
|
|
52
55
|
name="<%= attribute.singular_name %>"
|
|
53
56
|
id="<%= attribute.singular_name %>"
|
|
54
|
-
@input="form.<%= attribute.column_name %> = $event.target.files[0]"
|
|
55
57
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
56
58
|
/>
|
|
57
59
|
<% elsif attribute.attachments? -%>
|
|
@@ -60,7 +62,6 @@
|
|
|
60
62
|
multiple
|
|
61
63
|
name="<%= attribute.singular_name %>[]"
|
|
62
64
|
id="<%= attribute.singular_name %>"
|
|
63
|
-
@input="form.<%= attribute.column_name %> = Array.from($event.target.files)"
|
|
64
65
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
65
66
|
/>
|
|
66
67
|
<% elsif input_type(attribute) == "checkbox" -%>
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
type="<%= input_type(attribute) %>"
|
|
69
70
|
name="<%= attribute.singular_name %>"
|
|
70
71
|
id="<%= attribute.singular_name %>"
|
|
71
|
-
|
|
72
|
+
:checked="<%= singular_table_name %>.<%= attribute.column_name %>"
|
|
72
73
|
class="block mt-2 h-5 w-5"
|
|
73
74
|
/>
|
|
74
75
|
<% else -%>
|
|
@@ -76,12 +77,12 @@
|
|
|
76
77
|
type="<%= input_type(attribute) %>"
|
|
77
78
|
name="<%= attribute.singular_name %>"
|
|
78
79
|
id="<%= attribute.singular_name %>"
|
|
79
|
-
|
|
80
|
+
:value="<%= singular_table_name %>.<%= attribute.column_name %>"
|
|
80
81
|
class="block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full"
|
|
81
82
|
/>
|
|
82
83
|
<% end -%>
|
|
83
|
-
<div v-if="
|
|
84
|
-
{{
|
|
84
|
+
<div v-if="errors.<%= attribute.column_name %>" class="text-red-500 px-3 py-2 font-medium">
|
|
85
|
+
{{ errors.<%= attribute.column_name %>.join(', ') }}
|
|
85
86
|
</div>
|
|
86
87
|
</div>
|
|
87
88
|
<% end -%>
|
|
@@ -90,38 +91,17 @@
|
|
|
90
91
|
<div class="inline">
|
|
91
92
|
<button
|
|
92
93
|
type="submit"
|
|
93
|
-
:disabled="
|
|
94
|
+
:disabled="processing"
|
|
94
95
|
class="rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer"
|
|
95
96
|
>
|
|
96
97
|
{{ submitText }}
|
|
97
98
|
</button>
|
|
98
99
|
</div>
|
|
99
|
-
</
|
|
100
|
+
</Form>
|
|
100
101
|
</template>
|
|
101
102
|
|
|
102
103
|
<script setup>
|
|
103
|
-
import {
|
|
104
|
+
import { Form } from '@inertiajs/vue3'
|
|
104
105
|
|
|
105
106
|
const { <%= singular_table_name %>, submitText } = defineProps(['<%= singular_table_name %>', 'submitText'])
|
|
106
|
-
const emit = defineEmits(['onSubmit'])
|
|
107
|
-
|
|
108
|
-
const form = useForm({
|
|
109
|
-
<% attributes.each do |attribute| -%>
|
|
110
|
-
<% if attribute.password_digest? -%>
|
|
111
|
-
password: '',
|
|
112
|
-
password_confirmation: '',
|
|
113
|
-
<% else -%>
|
|
114
|
-
<%= attribute.column_name %>: <%= singular_table_name %>.<%= attribute.column_name %> || <%= default_value(attribute) %>,
|
|
115
|
-
<% end -%>
|
|
116
|
-
<% end -%>
|
|
117
|
-
})
|
|
118
107
|
</script>
|
|
119
|
-
|
|
120
|
-
<style module>
|
|
121
|
-
.label {
|
|
122
|
-
display: block;
|
|
123
|
-
}
|
|
124
|
-
.error {
|
|
125
|
-
color: red;
|
|
126
|
-
}
|
|
127
|
-
</style>
|
data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Index.ts.vue.tt → index.ts.vue.tt}
RENAMED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
<script setup lang="ts">
|
|
39
39
|
import { Head, Link } from '@inertiajs/vue3'
|
|
40
|
-
import <%= inertia_component_name %> from './<%=
|
|
40
|
+
import <%= inertia_component_name %> from './<%= singular_name %>.vue'
|
|
41
41
|
import { <%= inertia_model_type %> } from './types'
|
|
42
42
|
|
|
43
43
|
const { <%= plural_table_name %>, flash } = defineProps<{
|
data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Index.vue.tt → index.vue.tt}
RENAMED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
<script setup>
|
|
39
39
|
import { Head, Link } from '@inertiajs/vue3'
|
|
40
|
-
import <%= inertia_component_name %> from './<%=
|
|
40
|
+
import <%= inertia_component_name %> from './<%= singular_name %>.vue'
|
|
41
41
|
|
|
42
42
|
const { <%= plural_table_name %>, flash } = defineProps(['<%= plural_table_name %>', 'flash'])
|
|
43
43
|
</script>
|
data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{New.ts.vue.tt → new.ts.vue.tt}
RENAMED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
<Form
|
|
8
8
|
:<%= singular_table_name %>="<%= singular_table_name %>"
|
|
9
9
|
submitText="Create <%= human_name %>"
|
|
10
|
-
|
|
10
|
+
action="<%= js_resources_path %>"
|
|
11
|
+
method="post"
|
|
11
12
|
/>
|
|
12
13
|
|
|
13
14
|
<Link
|
|
@@ -20,14 +21,10 @@
|
|
|
20
21
|
</template>
|
|
21
22
|
|
|
22
23
|
<script setup lang="ts">
|
|
23
|
-
import { Head,
|
|
24
|
-
import Form from './Form.vue'
|
|
25
|
-
import { <%= inertia_model_form_type %>, <%= inertia_model_type %> } from './types'
|
|
24
|
+
import { Head, Link } from '@inertiajs/vue3'
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
import Form from './form.vue'
|
|
27
|
+
import type { <%= inertia_model_type %> } from './types'
|
|
28
28
|
|
|
29
|
-
const
|
|
30
|
-
form.transform((data) => ({ <%= singular_table_name %>: data }))
|
|
31
|
-
form.post('<%= js_resources_path %>')
|
|
32
|
-
}
|
|
29
|
+
const { <%= singular_table_name %> } = defineProps<{ <%= singular_table_name %>: <%= inertia_model_type %> }>()
|
|
33
30
|
</script>
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
<Form
|
|
8
8
|
:<%= singular_table_name %>="<%= singular_table_name %>"
|
|
9
9
|
submitText="Create <%= human_name %>"
|
|
10
|
-
|
|
10
|
+
action="<%= js_resources_path %>"
|
|
11
|
+
method="post"
|
|
11
12
|
/>
|
|
12
13
|
|
|
13
14
|
<Link
|
|
@@ -21,12 +22,8 @@
|
|
|
21
22
|
|
|
22
23
|
<script setup>
|
|
23
24
|
import { Head, Link } from '@inertiajs/vue3'
|
|
24
|
-
import Form from './Form.vue'
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
import Form from './form.vue'
|
|
27
27
|
|
|
28
|
-
const
|
|
29
|
-
form.transform((data) => ({ <%= singular_table_name %>: data }))
|
|
30
|
-
form.post('<%= js_resources_path %>')
|
|
31
|
-
}
|
|
28
|
+
const { <%= singular_table_name %> } = defineProps(['<%= singular_table_name %>'])
|
|
32
29
|
</script>
|
data/lib/generators/inertia_tw_templates/scaffold/templates/vue/{Show.ts.vue.tt → show.ts.vue.tt}
RENAMED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
<script setup lang="ts">
|
|
45
45
|
import { Head, Link } from '@inertiajs/vue3'
|
|
46
|
-
import <%= inertia_component_name %> from './<%=
|
|
46
|
+
import <%= inertia_component_name %> from './<%= singular_name %>.vue'
|
|
47
47
|
import { <%= inertia_model_type %> } from './types'
|
|
48
48
|
|
|
49
49
|
const { <%= singular_table_name %>, flash } = defineProps<{
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
<script setup>
|
|
45
45
|
import { Head, Link } from '@inertiajs/vue3'
|
|
46
|
-
import <%= inertia_component_name %> from './<%=
|
|
46
|
+
import <%= inertia_component_name %> from './<%= singular_name %>.vue'
|
|
47
47
|
|
|
48
48
|
const { <%= singular_table_name %>, flash } = defineProps(['<%= singular_table_name %>', 'flash'])
|
|
49
49
|
</script>
|
|
@@ -50,7 +50,7 @@ module InertiaRails
|
|
|
50
50
|
case options.frontend_framework
|
|
51
51
|
when 'react' then typescript? ? 'tsx' : 'jsx'
|
|
52
52
|
when 'vue' then 'vue'
|
|
53
|
-
when 'svelte'
|
|
53
|
+
when 'svelte' then 'svelte'
|
|
54
54
|
else
|
|
55
55
|
raise ArgumentError, "Unknown frontend framework: #{options.frontend_framework}"
|
|
56
56
|
end
|
|
@@ -13,8 +13,7 @@ module InertiaRails
|
|
|
13
13
|
if dependencies['@inertiajs/react']
|
|
14
14
|
'react'
|
|
15
15
|
elsif dependencies['@inertiajs/svelte']
|
|
16
|
-
|
|
17
|
-
version.start_with?('5') ? 'svelte' : 'svelte4'
|
|
16
|
+
'svelte'
|
|
18
17
|
elsif dependencies['@inertiajs/vue3']
|
|
19
18
|
'vue'
|
|
20
19
|
else
|
|
@@ -37,7 +36,7 @@ module InertiaRails
|
|
|
37
36
|
end
|
|
38
37
|
|
|
39
38
|
def inertia_base_path
|
|
40
|
-
(class_path + [file_name]).
|
|
39
|
+
(class_path + [file_name.pluralize]).join('/')
|
|
41
40
|
end
|
|
42
41
|
|
|
43
42
|
def inertia_component_name
|
|
@@ -19,7 +19,7 @@ module InertiaRails
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
template "#{options.frontend_framework}/#{partial_name}.#{template_extension}",
|
|
22
|
-
File.join(base_path, "#{
|
|
22
|
+
File.join(base_path, "#{singular_name}.#{extension}")
|
|
23
23
|
|
|
24
24
|
template "#{options.frontend_framework}/types.ts", File.join(base_path, 'types.ts') if typescript?
|
|
25
25
|
end
|
|
@@ -34,11 +34,11 @@ module InertiaRails
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def available_views
|
|
37
|
-
%w[
|
|
37
|
+
%w[index edit show new form]
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def partial_name
|
|
41
|
-
'
|
|
41
|
+
'one'
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
end
|