質問編集履歴
2
タイトル変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
入力フォーム追加•削除機能でのエラー”undefined method `new_record?' for nil:NilClass”
|
test
CHANGED
File without changes
|
1
エラーメッセージ画像表示されず、入力しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,51 @@
|
|
24
24
|
|
25
25
|
```
|
26
26
|
|
27
|
+
NoMethodError in Posts#new
|
28
|
+
|
29
|
+
Showing /myapp/app/views/items/_items_fields.html.erb where line #33 raised:
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
undefined method `new_record?' for nil:NilClass
|
34
|
+
|
35
|
+
Extracted source (around line #33):
|
36
|
+
|
37
|
+
31 </div>
|
38
|
+
|
39
|
+
32 <!-- 削除ボタン -->
|
40
|
+
|
41
|
+
33 <%= link_to_remove_association "削除", f %>
|
42
|
+
|
43
|
+
34 <% end %>
|
44
|
+
|
45
|
+
35 </td>
|
46
|
+
|
47
|
+
36 </tr>
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
Trace of template inclusion: #<ActionView::Template app/views/posts/new.html.erb locals=[]>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
Rails.root: /myapp
|
56
|
+
|
57
|
+
|
58
|
+
|
27
|
-
|
59
|
+
Application Trace | Framework Trace | Full Trace
|
60
|
+
|
61
|
+
app/views/items/_items_fields.html.erb:33
|
62
|
+
|
63
|
+
app/views/items/_items_fields.html.erb:7
|
64
|
+
|
65
|
+
app/views/posts/new.html.erb:15
|
66
|
+
|
67
|
+
app/views/posts/new.html.erb:14
|
68
|
+
|
69
|
+
app/views/posts/new.html.erb:5
|
70
|
+
|
71
|
+
|
28
72
|
|
29
73
|
```
|
30
74
|
|