= form_tag({}, :class => 'filterable-data') do

  - if content_for? filter_controls or content_for? form_header
    %div.controls
      %ul.filter-controls
        = yield filter_controls if content_for? filter_controls

      - if content_for? form_header
        %ul.actions
          = yield form_header

  %table.flat.checkbox_table{ 'data-none_selected' => t("default_none_selected_message"), 'data-confirm' => t("default_confirm_message") }
    %thead
      %tr
        - columns.each do |column|
          - if column[:name] == 'checkbox'
            %th{:class => column[:class]}= check_box_tag :select_all, true, false, :class => 'select_all'
          -else
            %th{:class => column[:class]}= column[:name]
      - if !rows.any?
        %tr
          %td{:colspan => columns.size}= t('search.no_results')
    = rows.collect {|row| capture_haml(row, &block)}.to_s.html_safe

  - if content_for? form_footer
    %fieldset.options
      = yield form_footer

- if rows.is_a?(WillPaginate::Collection)
  = render_pagination(rows)

= form_tag({}, :class => 'filterable-data') do

  - if content_for? filter_controls or content_for? form_header
    %div.controls
      %ul.filter-controls
        = yield filter_controls if content_for? filter_controls

      - if content_for? form_header
        %ul.actions
          = yield form_header

  %table.flat.checkbox_table{ 'data-none_selected' => t("default_none_selected_message"), 'data-confirm' => t("default_confirm_message") }
    %thead
      %tr
        - columns.each do |column|
          - if column[:name] == 'checkbox'
            %th{:class => column[:class]}= check_box_tag :select_all, true, false, :class => 'select_all'
          -else
            %th{:class => column[:class]}= column[:name]
      - if !rows.any?
        %tr
          %td{:colspan => columns.size}= t('search.no_results')
    = rows.collect {|row| capture_haml(row, &block)}.join.html_safe

  - if content_for? form_footer
    %fieldset.options
      = yield form_footer

- if rows.is_a?(WillPaginate::Collection)
  = render_pagination(rows)

Fix filter_table for Ruby 1.9
Fix filter_table for Ruby 1.9
