【发布时间】:2017-03-06 07:06:04
【问题描述】:
这是我一直在研究的索引。我希望 _form 生成的每个新表都水平添加新列,而不是垂直向下。有什么建议吗?
我希望它从 #1 变为 #2
表#1
名称(公制)
日期结果
名称(公制)
日期结果
名称(公制)
日期结果
表 #2
名称(公制)|名称(公制)|名称(公制)
日期结果 |日期结果 |日期结果
<!-- Default bootstrap panel contents -->
<div id="values" class="panel panel-default">
<div class="panel-heading"><h4><b>AVERAGE</b></h4></div>
<!-- Table -->
<table>
<thead>
<% @averaged_quantifieds.each do |averaged| %>
<% if averaged.user == current_user %>
<tr>
<th class="value">
<%= averaged.name %>
(<%= averaged.metric %>)
</th>
</tr>
</thead>
<tbody>
<tr>
<th class="category">
<%= averaged.date.strftime("%m-%d-%Y") %>
</th>
<th class="value">
<%= averaged.result %>
</th>
</tr>
<% end %>
<% end %>
</table>
</div>
【问题讨论】:
-
您向 SO 提出的大多数问题表明您甚至没有进行基础研究。我建议您在提问之前使用 google 并多摆弄一下代码。在这种情况下,阅读表格及其 HTML 语法肯定是一个好主意。它还可以让你学到更多。
标签: ruby-on-rails ruby forms html-table