diff options
author | azul <azul@leap.se> | 2014-07-09 13:25:31 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2014-07-09 13:25:31 +0200 |
commit | dc740e4311101bf7297996788b25a99edafbe759 (patch) | |
tree | d989456179551fb167f6c41ba4b54bbd4a77a7ac /app/helpers/table_helper.rb | |
parent | 19da5429308412c19176733d2b32ccbf2c08df1c (diff) | |
parent | 0cc11ebb609de225fbeacbf80788b992b88b6ce6 (diff) |
Merge pull request #173 from azul/feature/unblock-handles
Allow admins to unblock handles
Diffstat (limited to 'app/helpers/table_helper.rb')
-rw-r--r-- | app/helpers/table_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/table_helper.rb b/app/helpers/table_helper.rb new file mode 100644 index 0000000..16a7019 --- /dev/null +++ b/app/helpers/table_helper.rb @@ -0,0 +1,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 |