table_for icon indicating copy to clipboard operation
table_for copied to clipboard

Add footer

Open lunich opened this issue 14 years ago • 1 comments

It's necessary to add :render_footer option. If it's set, render <tfoot> with the same content as in the <thead> (at least for first).

lunich avatar Nov 17 '11 12:11 lunich

That would be nice. Maybe something like:

<%= table_for @users do -%>
  <% column :user %>
  <% column :sum_login, :footer => @total_sum_logins %>
<% end %>

Or for multiline footers:

<%= table_for @users do -%>
  <% column :user %>
  <% column :sum_login do |sum_login| %>
    <% :footer @sum_logins_per_page %>
    <% :footer @sum_logins %>
  <% end %>
<% end %>

tonymarschall avatar Mar 31 '12 12:03 tonymarschall