###完成したいこと
・テーブル内ををクリックでモーダル表示したいです。
###試したこと
https://code.i-harness.com/ja/q/105a7adここのサイトにあることを参考試しましたがダメでした。
###クリックするページ
<% @books.each do |book| %> <table> <tbody> <tr> <td> <%= attachment_image_tag book, :image, :fill, 100, 100, fallback: "default.jpg"%> </td> <td> <%=link_to book.title ,book_path(book.id)%> </td> </tr> <tr> <td>Price</td> <td>¥<%=book.price %> </td> </tr> <tr> <td>Category</td> <td> <%=book.category %> </td> </tr> <tr> <td>Opinion</td> <td> <%=book.opinion %> </td> </tr> <tr> <td>投稿日<br> <%=book.date%> </td> <td> <%= link_to book.user do %> <%= attachment_image_tag book.user, :profile_image, :fill, 50, 50, fallback: "default.jpg" , class: "img-circle"%><br> <%= book.user.name %> <% end %> </td> </tr> </tbody> </table> <% end %>
###モーダルとしてクリック時に表示させたいページ
<table class="table"> <tbody> <tr></tr> <tr> <th>名前</th> <th> <%= @bookc.user.name %> </th> </tr> <tr> <th>商品名</th> <th> <%= @bookc.user.product %> </th> </tr> </tbody> </table>
###本当に困ってますのでできれば早めにお願いします。