質問編集履歴

2

編集

2020/10/16 08:00

投稿

Tayutar
Tayutar

スコア4

test CHANGED
File without changes
test CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
 
42
42
 
43
- Rails.root: /Users/iwasakenta/projects/hondeput
43
+
44
44
 
45
45
  ```
46
46
 

1

エラー修正

2020/10/16 08:00

投稿

Tayutar
Tayutar

スコア4

test CHANGED
File without changes
test CHANGED
@@ -22,16 +22,12 @@
22
22
 
23
23
  NoMethodError in PostsController#destroy
24
24
 
25
- undefined method `image_id' for #<Post:0x00007fe452285d50> Did you mean? image
25
+ undefined method `destroy' for nil:NilClass
26
-
27
- Extracted source (around line #32):
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