【问题标题】:Table with ruby doesn't match红宝石表不匹配
【发布时间】: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 %>

【问题讨论】:

标签: html css ruby-on-rails


【解决方案1】:

在描述&lt;th&gt;后添加3个空&lt;th&gt;,并检查您创建文章时是否在描述前插入空格。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-04-22
    • 1970-01-01
    • 2014-02-11
    • 1970-01-01
    • 1970-01-01
    • 2012-06-05
    • 2019-08-09
    • 1970-01-01
    相关资源
    最近更新 更多