【发布时间】:2020-05-06 16:39:51
【问题描述】:
我正在尝试做一篇文章展示,输入后我们可以看到表格和描述不匹配。
The description does not go on wtih his string.
<h1> Tous les articles ! </h1> <p> <%= link_to 'Créer un article',
new_article_path %> </p> <table>
<tr>
<th> Titre</th>
<th>Description</th>
</tr>
<% @articles.each do |article| %>
<tr>
<td><%= article.title %><td>
<td><%= article.description %><td>
<td><%= link_to 'Edit', edit_article_path(article)%></td>
<td><%= link_to 'Show', article_path(article)%></td>
<td><%= link_to 'Delet', article_path(article), method: :delete%></td>
</tr>
<%end%> </table> <%= link_to 'Home', root_path %>
【问题讨论】:
-
不是 100% 确定这个问题,但如果您希望表格标题与数据匹配,请查看此内容。 w3schools.com/html/html_tables.asp
标签: html css ruby-on-rails