回答編集履歴
1
追記
answer
CHANGED
@@ -10,4 +10,6 @@
|
|
10
10
|
@posts = Post.all
|
11
11
|
して、
|
12
12
|
`@post = @posts.select{|post| post.id == params[:id].to_i}.first`
|
13
|
-
して、その@postをなおし、saveして `render action: :index`
|
13
|
+
して、その@postをなおし、saveして `render action: :index`
|
14
|
+
|
15
|
+
select でなく find にすれば firstは要らないけど、find が RelationのfindかEnumrableのかどっちにとられるか分からないので日和った
|