回答編集履歴
1
追記
answer
CHANGED
@@ -1,3 +1,13 @@
|
|
1
1
|
` @posts = Post.includes(:images).all`
|
2
2
|
として(@postではなく複数形にしています。)、viewのなかで
|
3
|
-
`@posts.each do |post|` として `images = post.images` とすればimageの一式が採れます。あとはできますね?
|
3
|
+
`@posts.each do |post|` として `images = post.images` とすればimageの一式が採れます。あとはできますね?
|
4
|
+
|
5
|
+
|
6
|
+
@posts と複数形にしましょう。
|
7
|
+
haml は使っていないので文法間違えてるかもですが
|
8
|
+
```
|
9
|
+
- @posts.each do | post |
|
10
|
+
- images = post.images
|
11
|
+
= ここに imagesを使って描画。どう描くのか記載ないのでお任せ
|
12
|
+
```
|
13
|
+
ですね
|