class ActiveAdmin::Views::SemanticInputsProxy
def build(form_builder, *args, &block)
def build(form_builder, *args, &block) html_options = args.extract_options! html_options[:class] ||= "inputs" legend = args.shift if args.first.is_a?(::String) legend = html_options.delete(:name) if html_options.key?(:name) legend_tag = legend ? helpers.tag.legend(helpers.tag.span(legend), class: "fieldset-title") : "" fieldset_attrs = tag_attributes html_options @opening_tag = "<fieldset #{fieldset_attrs}>#{legend_tag}<ol>" @closing_tag = "</ol></fieldset>" super(*(args << html_options), &block) end
def tag_attributes(html_options)
def tag_attributes(html_options) if Rails::VERSION::MAJOR <= 6 # Reimplement tag.attributes to backport support for Rails 6.1. # TODO: this can be removed when support for Rails 6.x is dropped helpers.tag.tag_options(html_options.to_h).to_s.strip.html_safe else helpers.tag.attributes html_options end end