aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-06-13 11:42:39 +0200
committerTeddy Wing2017-06-13 11:42:39 +0200
commit4ec831984516cb29e93f8d45f205bdbaf04096b7 (patch)
tree414c91bb06213bd44cdda640215e216d1badcc8b
parent07ed048cd2f2231fa26345a94c725363344ee77b (diff)
downloadchouette-core-4ec831984516cb29e93f8d45f205bdbaf04096b7.tar.bz2
TableBuilder: Move comment and rewrite for others
Previously I had written this comment for myself. Refs #3479
-rw-r--r--app/helpers/table_builder_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/table_builder_helper.rb b/app/helpers/table_builder_helper.rb
index 1244464fc..112a2f033 100644
--- a/app/helpers/table_builder_helper.rb
+++ b/app/helpers/table_builder_helper.rb
@@ -98,8 +98,9 @@ module TableBuilderHelper
else
item.try(column.attribute)
end
- # if so this column's contents get transformed into a link to the object
+
if column.attribute == 'name' || column.attribute == 'comment'
+ # Build a link to the `item`
polymorph_url = polymorphic_url_parts(item)
bcont << content_tag(:td, link_to(value, polymorph_url), title: 'Voir')
else