首页 > 其他 > 详细

页面没有显示数据

时间:2019-05-01 10:46:09      阅读:108      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

<div class="col-md-12">
  <div class="group">
    <%= link_to("New group", new_group_path, class: "btn btn-primary pull-right") %>
  </div>
  <table class="table table-hover">
    <thead>
      <tr>
        <td>#</td>
        <td>Title</td>
        <td>Description</td>
      </tr>
    </thead>
    <tbody>
      <% @groups.each do |group| %>
        <tr>
          <td>#</td>
          <td><% link_to(group.title, group_path(group)) %></td>
          <td><% group.description %></td>
          <td>
            <% link_to("Edit", edit_group_path(group), class: "btn btn-sm btn-defalut") %>
            <% link_to("Delete", group_path(group), class: "btn btn-sm btn-defalut",
                        method: :delete, data: {confirm: "Are you sure?" } ) %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>

 

原因1:<%= %>忘记加“=”

原因2:defalut拼写错误

  

页面没有显示数据

原文:https://www.cnblogs.com/wtyqer/p/10798868.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!