aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTeddy Wing2017-06-13 11:45:44 +0200
committerTeddy Wing2017-06-13 11:45:44 +0200
commitd8f9a60e6ce5e334bd8022ed571b06cccb90ec2a (patch)
tree15b5def993e089de419530beeb9a6536aa4e72a1 /app
parent4ec831984516cb29e93f8d45f205bdbaf04096b7 (diff)
downloadchouette-core-d8f9a60e6ce5e334bd8022ed571b06cccb90ec2a.tar.bz2
TableBuilder: Rename `#links_builder` to `#build_links`
The method name makes more sense to me as a verb. Also add a little writespace making the code more vertical for readability. Refs #3479
Diffstat (limited to 'app')
-rw-r--r--app/helpers/table_builder_helper.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/helpers/table_builder_helper.rb b/app/helpers/table_builder_helper.rb
index 112a2f033..2d32207aa 100644
--- a/app/helpers/table_builder_helper.rb
+++ b/app/helpers/table_builder_helper.rb
@@ -107,7 +107,14 @@ module TableBuilderHelper
bcont << content_tag(:td, value)
end
end
- bcont << content_tag(:td, links_builder(item, links), class: 'actions') if links.any?
+
+ if links.any?
+ bcont << content_tag(
+ :td,
+ build_links(item, links),
+ class: 'actions'
+ )
+ end
bcont.join.html_safe
end
@@ -115,8 +122,7 @@ module TableBuilderHelper
end
end
- # TODO: `def build_link[s]`
- def links_builder(item, actions)
+ def build_links(item, actions)
trigger = content_tag :div, class: 'btn dropdown-toggle', data: { toggle: 'dropdown' } do
content_tag :span, '', class: 'fa fa-cog'
end