質問編集履歴
2
編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
-
|
43
|
+
|
44
44
|
|
45
45
|
```
|
46
46
|
|
1
エラー修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,16 +22,12 @@
|
|
22
22
|
|
23
23
|
NoMethodError in PostsController#destroy
|
24
24
|
|
25
|
-
undefined method `
|
25
|
+
undefined method `destroy' for nil:NilClass
|
26
|
-
|
27
|
-
|
26
|
+
|
28
|
-
|
29
|
-
|
27
|
+
|
30
28
|
|
31
29
|
def destroy
|
32
30
|
|
33
|
-
# @post = Post.find(params[:id])
|
34
|
-
|
35
31
|
@post.destroy
|
36
32
|
|
37
33
|
redirect_to posts_path
|
@@ -40,7 +36,7 @@
|
|
40
36
|
|
41
37
|
|
42
38
|
|
43
|
-
|
39
|
+
@post.destoryで怒られる。
|
44
40
|
|
45
41
|
|
46
42
|
|