这是我的代码,我想要显示书桌上的书籍细节。如果其他条件工作不正常?
<div class="tab-pane" id="computer"> <!-- Branch Computer -->
<legend> Computer Science</legend>
<table class ="table table-hover">
<thead>
<tr>
<th> S.No </th>
<th> Book Name </th>
<th> Year </th>
<th> User ID</th>
<th> Owner Address</th>
</tr>
</thead>
<tbody>
<% @books.each do |b| %>
<tr>
<% if b.branch == "Computer Science"%>
<td><%= b.id%></td>
<td><%= b.book_name%></td>
<td><%= b.year%></td>
<td><%= b.user_id%></td>
<!-- For displaying user details -->
<% @susers.each do |s|%>
<% if s.user_id == b.user_id %>
<td><%= s.address %></td>
<%else%>
<td><%"Not found"%></td>
<%end%>
<%end%>
<%else%>
<td><%"No any book of this branch"%></td>
<%end%>
</tr>
<%end%>
</tbody>
</table>
</div><!-- End of Computer Branch-->
但我不打结果在这里输出是什么问题?
它是这样显示的。注意每行的长行。 编辑后,我得到这么多。
确定这是什么异常事情在终端
你可能会张贴你的CSS,假设你说的问题是与你的表疯狂的线我相信问题是在CSS中。与类表和tablehover和那些(td,th,tr,tbody's)的子定义 – u8sand
实际上那些所有类都是twitter引导。他们刚才提到要使用那些需要的类。 –
第31行需要<