summaryrefslogtreecommitdiff
path: root/app/helpers/table_helper.rb
blob: 16a70192898efdc704e30eeaefe51a39c57c2185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module TableHelper

  # we do the translation here so the .key lookup is relative
  # to the partial the helper was called from.
  def table(content, columns)
    render 'common/table',
      content: content,
      columns: columns,
      headers: columns.map {|h| t(".#{h}", cascading: true) },
      none: t('.none', cascading: true)
  end

end