Ruby on rails 奇怪的危险行为:自动打印所有表格内容

Ruby on rails 奇怪的危险行为:自动打印所有表格内容,ruby-on-rails,gem,Ruby On Rails,Gem,我正在我的项目中使用回形针宝石 index.html.erb: <h1 class="current-category"> <%= params[:category] %></h1> <% if @books.count == 0 %> <h1>There are no books in this category</h1> <%else%> <div class="row">

我正在我的项目中使用回形针宝石

index.html.erb:

<h1 class="current-category">
<%= params[:category] %></h1>

<% if @books.count == 0 %>
    <h1>There are no books in this category</h1>
<%else%>
    <div class="row">
    <%= @books.each do |book| %>
    <div class="col-md-3">
    <a href="/books/<%= book.id %>" >
        <%= image_tag book.book_img.url(:book_index), class: "book" %>

    </a>
    </div>
    <% end %>
    </div>
<%end%>

这一类没有书
问题是index.html.erb显示了图书数据库的所有图像和全部内容

我在下面添加了一个截图。这似乎是回形针宝石中的一只虫子。或者我犯了什么错误


从下面的行中删除
=

<% @books.each do |book| %>