Module: Plutonium::Definition::StructuredInputs

Extended by:
ActiveSupport::Concern
Included in:
Base, Interaction::Base
Defined in:
lib/plutonium/definition/structured_inputs.rb

Overview

Classless structured inputs: a group of fields collected into a hash (single) or an array of hashes (when ‘repeat:` is given). Mixed into both resource definitions and interactions.

Examples:

structured_input :address do |f|
  f.input :street
  f.input :city
end

structured_input :contacts, repeat: 10 do |f|
  f.input :label
  f.input :phone_number
end

Defined Under Namespace

Classes: FieldsDefinition

Instance Method Summary collapse

Instance Method Details

#defined_structured_inputsObject

Instance access mirrors the defineable_prop convention (where ‘defined_<plural>` is available on instances). The form’s render path and the param cleaner both hold a definition instance, so they read the registry through here.



62
63
64
# File 'lib/plutonium/definition/structured_inputs.rb', line 62

def defined_structured_inputs
  self.class.defined_structured_inputs
end