Class: ActiveAdmin::Views::SemanticInputsProxy
- Inherits:
-
FormtasticProxy
- Object
- Arbre::Rails::Forms::FormBuilderProxy
- FormtasticProxy
- ActiveAdmin::Views::SemanticInputsProxy
- Defined in:
- lib/active_admin/views/components/active_admin_form.rb
Instance Method Summary collapse
Methods inherited from FormtasticProxy
#closing_tag, #opening_tag, #split_string_on, #to_s
Instance Method Details
#build(form_builder, *args, &block) ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/active_admin/views/components/active_admin_form.rb', line 127 def build(form_builder, *args, &block) = args. [:class] ||= "inputs" legend = args.shift if args.first.is_a?(::String) legend = .delete(:name) if .key?(:name) legend_tag = legend ? "<legend><span>#{legend}</span></legend>" : "" fieldset_attrs = .map { |k, v| %Q{#{k}="#{v}"} }.join(" ") @opening_tag = "<fieldset #{fieldset_attrs}>#{legend_tag}<ol>" @closing_tag = "</ol></fieldset>" super(*(args << ), &block) end |