回答編集履歴

1

追記

2020/11/23 04:39

投稿

asm
asm

スコア15147

test CHANGED
@@ -1 +1,47 @@
1
1
  `prototypes#new`のviewに問題があります。
2
+
3
+
4
+
5
+ ----
6
+
7
+
8
+
9
+ **追記**
10
+
11
+
12
+
13
+ _form.html.erbの
14
+
15
+ > <%= form_with url:prototypes_path, method: :prototypes, local: true do |f|%>
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+ ```erb
24
+
25
+ <%= form_with model: prototype, local: true do |f|%>
26
+
27
+ ```
28
+
29
+
30
+
31
+ にするとよいかと思います。
32
+
33
+
34
+
35
+ `method: :prototypes`で動いてる理由が正直分かりませんが、質問に提示された`routes.rb`ならば↑で必要十分です。
36
+
37
+
38
+
39
+ ---
40
+
41
+
42
+
43
+ > uninitialized constant PrototypesController::Prototypes
44
+
45
+
46
+
47
+ 質問のときと`prototypes_controller.rb`が変わっておりPrototype**s**になってる事が問題です。