class ActiveAdmin::Views::SemanticInputsProxy

Public Instance Methods

build(form_builder, *args, &block) click to toggle source
Calls superclass method
# File lib/active_admin/views/components/active_admin_form.rb, line 122
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 ? "<legend><span>#{legend}</span></legend>" : ""
  fieldset_attrs = html_options.map {|k, v| %Q{#{k}="#{v}"} }.join(" ")
  @opening_tag = "<fieldset #{fieldset_attrs}>#{legend_tag}<ol>"
  @closing_tag = "</ol></fieldset>"
  super(*(args << html_options), &block)
end