回答編集履歴
1
追記
answer
CHANGED
@@ -1,1 +1,24 @@
|
|
1
|
-
`prototypes#new`のviewに問題があります。
|
1
|
+
`prototypes#new`のviewに問題があります。
|
2
|
+
|
3
|
+
----
|
4
|
+
|
5
|
+
**追記**
|
6
|
+
|
7
|
+
_form.html.erbの
|
8
|
+
> <%= form_with url:prototypes_path, method: :prototypes, local: true do |f|%>
|
9
|
+
|
10
|
+
を
|
11
|
+
|
12
|
+
```erb
|
13
|
+
<%= form_with model: prototype, local: true do |f|%>
|
14
|
+
```
|
15
|
+
|
16
|
+
にするとよいかと思います。
|
17
|
+
|
18
|
+
`method: :prototypes`で動いてる理由が正直分かりませんが、質問に提示された`routes.rb`ならば↑で必要十分です。
|
19
|
+
|
20
|
+
---
|
21
|
+
|
22
|
+
> uninitialized constant PrototypesController::Prototypes
|
23
|
+
|
24
|
+
質問のときと`prototypes_controller.rb`が変わっておりPrototype**s**になってる事が問題です。
|