質問編集履歴

2

共通テンプレートファイルのコード追加

2022/07/31 16:25

投稿

pi-nattu
pi-nattu

スコア61

test CHANGED
File without changes
test CHANGED
@@ -62,4 +62,18 @@
62
62
  </head>
63
63
  </html>
64
64
  ```
65
+ ```ruby
66
+ #view/books/_book.html.erb
67
+ <% books.each do |book| %>
68
+ <div>
69
+ <%= link_to user_path(book.id) do %>
70
+ <P><%= image_tag book.user.get_profile_image(100,100) %></P>
71
+ <% end %>
72
+ <h3>Title</h3><br>
73
+ <%= link_to book.title, book_path(book.id) %></p>
74
+ <h3>Opinion</h3><br>
75
+ <%= book.body %>
76
+ </div>
77
+ <% end %>
78
+ ```
65
79
 

1

初心者アイコンへ変更

2022/07/31 15:43

投稿

pi-nattu
pi-nattu

スコア61

test CHANGED
@@ -1 +1 @@
1
- undefined local variable or method エラーを解決したい
1
+ undefined local variable or methodエラーを解決したい
test CHANGED
File without changes