app/views/hub/order_tabs.html.erb
<div id="hub_order">
<div class="panels-container panel">
<div class="title action-line">
<span>Hub - Order tabs</span>
<%= link_to('Back to dashboard', dashboard_path, 'data-icon' => 'arrow-left', 'class' => 'small-icon') -%>
</div>
<div class="content">
Drag the handle to sort.
</div>
</div>
<table id="tabs"
data-sortable
data-sortable-items="tr"
data-sortable-on-change-url="<%= update_tab_order_hub_path -%>">
<% sessions_current_user.hub_tab_order.each_with_index do |t, i| -%>
<%= content_tag :tr, i, {id: "order_#{t}"} do -%>
<td class="handle">
<span><%= t -%></span>
</td>
<% end %>
<% end %>
</table>
</div>