From 771b594f9837cd666a67fe61c0b3a1c92da43adf Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Wed, 20 Jun 2018 15:24:50 +0900 Subject: [PATCH] Extract html class Signed-off-by: Kenji Okimoto --- app/form_builders/fluentd_form_builder.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/form_builders/fluentd_form_builder.rb b/app/form_builders/fluentd_form_builder.rb index 0bcb91a..ace04f6 100644 --- a/app/form_builders/fluentd_form_builder.rb +++ b/app/form_builders/fluentd_form_builder.rb @@ -58,9 +58,10 @@ class FluentdFormBuilder < ActionView::Helpers::FormBuilder section_class = object.class._sections[key] children = object.__send__(key) || { "0" => {} } html = "" + html_class = "js-nested-column #{section_class.multi ? "js-multiple" : ""}" children.each do |index, child| - html << content_tag("div", class: "js-nested-column #{section_class.multi ? "js-multiple" : ""}") do + html << content_tag("div", class: html_class) do _html = "" _html << append_and_remove_links if section_class.multi _html << label(key, nil, data: { toggle: "tooltip", placement: "right" }, title: object.desc(key))