回答編集履歴
1
内容の変更
test
CHANGED
@@ -1,4 +1,28 @@
|
|
1
1
|
```
|
2
|
+
|
3
|
+
def create
|
4
|
+
|
5
|
+
@diary = Diary.find(params[:diary_id])
|
6
|
+
|
7
|
+
@reply = Reply.new(reply_params)
|
8
|
+
|
9
|
+
if @reply.save!
|
10
|
+
|
11
|
+
redirect_to root_path
|
12
|
+
|
13
|
+
else
|
14
|
+
|
15
|
+
redirect_to root_path
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
|
2
26
|
|
3
27
|
def reply_params
|
4
28
|
|
@@ -7,7 +31,3 @@
|
|
7
31
|
end
|
8
32
|
|
9
33
|
```
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
だとどうなるでしょうか?
|