Class: Super::Form::Builder

Inherits:
ActionView::Helpers::FormBuilder
  • Object
show all
Defined in:
lib/super/form/builder.rb

Overview

Example

super_form_for([:admin, @member]) do |f|
  # the long way
  f.super.label :name
  f.super.text_field :name
  f.super.inline_errors :name

  # the short way (slightly different from the long way, for alignment)
  f.super.text_field! :position
end

Refer to the Rails docs: https://api.rubyonrails.org/classes/ActionView/Helpers/FormBuilder.html

Defined Under Namespace

Classes: Wrappers

Constant Summary collapse

FIELD_ERROR_PROC =
proc { |html_tag, instance| html_tag }
FORM_BUILDER_DEFAULTS =
{ builder: self }.freeze

Instance Method Summary collapse

Instance Method Details

#super(**options) ⇒ Object



25
26
27
# File 'lib/super/form/builder.rb', line 25

def super(**options)
  @super_wrappers ||= Wrappers.new(self, @template)
end