1
的儀表板如何定製比方說,我有一個ActiveRecord的查詢:自定義查詢排序表中ActiveAdmin
User.select('name', 'created_at').all
=> [#<User created_at: "2012-08-06 13:27:40", name: "Alice">, #<User created_at: "2012-08-06 15:41:33", name: "Bill">]
如何通過created_at
列顯示與行跨度的可分類表?
預期輸出HTML:
<table>
<tr>
<th>created_at</th>
<td>name</td>
</tr>
<tr>
<td>2012-08-06</td>
<td>Alice</td>
</tr>
<tr>
<td>2012-08-06</td>
<td>Bill</td>
</tr>
</table>