回答編集履歴
1
修正
test
CHANGED
@@ -17,12 +17,6 @@
|
|
17
17
|
@post = Post.new
|
18
18
|
|
19
19
|
3.times { @post.photos.build }
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
# パンくずリスト
|
24
|
-
|
25
|
-
add_breadcrumb '投稿する', :new_post_path
|
26
20
|
|
27
21
|
end
|
28
22
|
|
@@ -49,14 +43,6 @@
|
|
49
43
|
3.times { @post.photos.build }
|
50
44
|
|
51
45
|
end
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
# パンくずリスト
|
56
|
-
|
57
|
-
add_breadcrumb @post.title, :post_path
|
58
|
-
|
59
|
-
add_breadcrumb '投稿の編集', :edit_post_path
|
60
46
|
|
61
47
|
end
|
62
48
|
|
@@ -97,6 +83,16 @@
|
|
97
83
|
render :edit
|
98
84
|
|
99
85
|
end
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
private
|
92
|
+
|
93
|
+
def post_params
|
94
|
+
|
95
|
+
params.require(:post).permit(:title, :content, :status, photos_attributes: [:id, :image, :_destroy])
|
100
96
|
|
101
97
|
end
|
102
98
|
|