def headers(*args, &block)
      column_options, html_options = get_column_and_html_options( args.extract_options! )
      if block_given?
        @header_line = FormatLine.new(args, column_options, html_options, nil, :thead)
        capture(&block)
      else
        @header_line = FormatLine.new(args, column_options, html_options, @collection.first, :thead)
      end
      render_thead
    end
def headers(*args, &block)
      column_options, html_options = get_column_and_html_options( args.extract_options! )
      if block_given?
        @header_line = FormatLine.new(args, column_options, html_options, nil, :thead)
        capture(&block)
      else
        @header_line = FormatLine.new(args, column_options, html_options, @collection.first, :thead)
      end
      render_thead
    end
Create a header with the name of the columns (th) around thead and tr.
 It can be called with or without a block, or with a list of columns.
 By default it will add the default actions (edit, delete).
 Also by default it will add a link to sort to the column.
 These two exemples are equivalent:

  # With a block:
  <% sorting_table_for @users do |table| %>
    <%= table.headers do %>
      <%= table.header :username %>
      <%= table.header :firstname %>
    <% end %>
  <% end %>

  # With a list:
  <% sorting_table_for @users do |table| %>
    <%= table.headers :username, :firstname %>
  <% end %>

  # Output:
  <table class='sorting_table_for'>
    <thead>
      <tr>
        <th class='cur-sort-not'><a href='/my_link?table_sort[username]=asc'>...</a></th>
        <th class='cur-sort-not'><a href='/my_link?table_sort[firstname]=asc'>...</a></th>
        <th>Edit</th>
        <th>Delete</th>
      </tr>
    </thead>
  </table>

 === Quick Headers

 When called without a block or a list, the headers are rendered for each column in
 the model's database table and the default actions (edit, delete), and the links to sort.

  <% sorting_table_for @users do |table| %>
    <%= table.headers %>
  <% end %>

 === Options

 * :sort - true of false to add or not sorting
 * :html - Hash options: class, id, ...
 * :caption - set caption on td

  # Html option:
  <% sorting_table_for @users do |table| do %>
    <%= table.headers :username, :firstname, :html => { :class => 'my_class', :id => 'my_id' }
  <% end %>

  # Sort option:
  <% sorting_table_for @users do |table| do %>
    <%= table.headers :sort => false %>
  <% end %>

 === I18n

 For each column contained in the model's database table, the name is set with the I18n translation.
 The translation are scoped by option 'i18n_default_scope' defined in your options.

  # Exemple of I18n options for header:
  SortingTableFor::TableBuilder.i18n_default_scope = [:controller, :action]

  # Ouput:
  I18n.t(:username, :scope => [:current_controller, :current_action]) => en.current_controller.current_action.username

 === Actions

 The option 'default_actions' contained the actions to add by default to the table. The header's actions
 are not sortable. The name of action is set with I18n translation.
 It's possible to add a value in the scope for header by option 'i18n_add_header_action_scope'

  # Exemple of default_actions:
  SortingTableFor::TableBuilder.default_actions = [:edit]
  SortingTableFor::TableBuilder.i18n_add_header_action_scope = :header

  # Ouput:
  I18n.t(:edit, :scope => [:current_controller, :current_action, :header]) => en.current_controller.current_action.header.edit

 === Sorting

 The link for sorting is set if the column is contained in the model's database table. the link for sorting
 is set with the current url, the builder adds a param 'table_sort'.

  # Exemple for column username:
  current url: /my_link
  param sort: /my_link?table_sort[username]=asc

 the name of the param is set by option: TableSortingFor::TableBuilder.params_sort_table

 === Values

 the values given to headers could be anything. Only the symbols are set with I18n translation.
 If you give other types (string, image, ...) there won't have sorting and I18n translation.