Rails Form Builder is not rendering all content

Asked

Viewed 31 times

1

I created a select with form Builder, but it doesn’t render all the content inside it

def select_box(name, value, select_options = {}, html_options = {})
  content_tag :div, class: class_name do
    label_content = html_options.delete(:label)

    content = [
      content_tag(:span, data: {init: "select"} do
        button(nil, type: "button") do
          content_tag(:span, "")
        end

        select(name, value, select_options, html_options)  
      end
    ]

    labelize_input! name, content, label_content.html_safe unless label_content.nil?

    content.join.html_safe
  end
end
  • Not rendering the button inside the second content_tag

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.