.activate!
Install the bridge: map every type in INPUTS and make the flat poetry wrapper the default (the Field owns its chrome, so the wrapper contributes only display: contents).
The simple_form adapter: activate! plus the input classes that map simple_form types onto poetry fields.
Generated from the gem's source documentation. Component classes are documented on their own gallery pages — this page carries the framework surface.
module · lib/poetry/simple_form.rb
The simple_form migration bridge: one initializer re-maps simple_form's input types onto classes that render whole poetry Fields through Poetry::Ui::FormBuilder. Every f.input keeps working; every poetry form control is reachable by name through as:.
| Constant | Description |
|---|---|
| BRIDGE_EXEMPT | Form-facing poetry components deliberately not reachable through a simple_form type, with the reason (empty today; the gate reads it). |
| COVERAGE | simple_form input type => the poetry component it renders (a registry key). The parity gate (test/poetry/simple_form/coverage_test.rb) checks this against every form-facing component in the registry. |
| INPUTS | simple_form input type => bridge input class. activate! installs exactly this table, so the coverage below cannot drift from it. |
| STOCK | simple_form types left to simple_form entirely, with the reason. |
| VERSION | The gem version. |
Install the bridge: map every type in INPUTS and make the flat poetry wrapper the default (the Field owns its chrome, so the wrapper contributes only display: contents).
module · lib/poetry/simple_form.rb
The Poetry namespace, shared by every gem in the family.
module · lib/generators/poetry/simple_form/install/install_generator.rb
The gem's Rails generators.
class < Rails::Generators::Base · lib/generators/poetry/simple_form/install/install_generator.rb
rails g poetry:simple_form:install - one initializer, the whole shim: activate! re-maps the input types and installs the passthrough wrapper. Delete the file to fall back to stock simple_form rendering.
module · lib/poetry/simple_form/inputs/base.rb
The input classes the bridge maps simple_form's types onto.
class < Poetry::SimpleForm::Inputs::CollectionBase · lib/poetry/simple_form/inputs/collection_inputs.rb
Serves as: :autocomplete: a poetry Field wrapping the Autocomplete; the collection becomes its suggestions.
Returns (String) — the rendered Field HTML
class < SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/base.rb
The shim's shared floor: every input renders through a Poetry::Ui::FormBuilder bound to the SAME object/template, so the poetry Field quartet (label/hint/error/aria) is byte-identical to the native-builder path - no duplicated derivation.
Render the attribute as a whole poetry Field through the bound Poetry::Ui::FormBuilder; the subclass's poetry_as pins the control type (nil lets poetry infer it).
_wrapper_options
(Hash, nil)
— unused - the Field owns its chrome
Returns (String) — the rendered Field HTML
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/boolean_input.rb
The horizontal boolean Field (poetry's f.input boolean story); input_html: { switch: true } opts into the setting-row Switch.
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/custom_inputs.rb
Serves as: :calendar: a Field wrapping the inline Calendar.
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/collection_inputs.rb
The collection floor: pairs from options[:collection] (both f.input(collection:) and f.association arrive here - association fetches the records first), label/value methods resolved with simple_form's own detection chain.
class < Poetry::SimpleForm::Inputs::CollectionBase · lib/poetry/simple_form/inputs/collection_inputs.rb
Serves as: :check_boxes: a poetry Field wrapping the checkbox group - one Checkbox row per collection item, posting an array.
Render the collection as a Field-wrapped checkbox group.
Returns (String) — the rendered Field HTML
class < Poetry::SimpleForm::Inputs::CollectionBase · lib/poetry/simple_form/inputs/collection_inputs.rb
Serves as: :radio_buttons: a poetry Field wrapping the RadioGroup component, one row per collection item.
Render the collection as a Field-wrapped RadioGroup.
Returns (String) — the rendered Field HTML
class < Poetry::SimpleForm::Inputs::CollectionBase · lib/poetry/simple_form/inputs/collection_inputs.rb
Serves as: :select (and f.association's default): a poetry Field wrapping the Select component; the hidden native <select> stays the serialization truth.
Render the collection as a Field-wrapped Select; include_blank/prompt becomes the placeholder option.
Returns (String) — the rendered Field HTML
class < Poetry::SimpleForm::Inputs::CollectionBase · lib/poetry/simple_form/inputs/collection_inputs.rb
Serves as: :combobox: a poetry Field wrapping the filterable Combobox.
Returns (String) — the rendered Field HTML
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/custom_inputs.rb
Serves as: :date_picker: a Field wrapping the DatePicker (popover calendar).
class < SimpleForm::Inputs::DateTimeInput · lib/poetry/simple_form/inputs/date_time_input.rb
date -> DateField, time -> TimeField; :datetime falls back to poetry's own DateTimeField (one datetime-local control, no select trio).
Render :date/:time/:datetime attributes as poetry DateField / TimeField / DateTimeField - one control each, ISO on the wire.
Returns (String) — the rendered HTML
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/file_input.rb
Serves as: :file: a poetry Field wrapping the FileInput component (the native file control in poetry chrome; input_html options such as variant:/multiple: pass through).
class < Poetry::SimpleForm::Inputs::CollectionBase · lib/poetry/simple_form/inputs/collection_inputs.rb
Serves as: :grouped_select: simple_form's group_method / group_label_method resolve the groups, poetry's Select renders them as labelled groups.
Returns (String) — the rendered Field HTML
class < Poetry::SimpleForm::Inputs::CollectionBase · lib/poetry/simple_form/inputs/collection_inputs.rb
Serves as: :native_select: a poetry Field wrapping the styled native <select> (the no-JS picker).
Returns (String) — the rendered Field HTML
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/numeric_input.rb
NumberField; poetry re-derives min/max/step from numericality, so the shim passes nothing simple_form computed.
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/custom_inputs.rb
Serves as: :otp: a Field wrapping the InputOtp (length: via poetry:).
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/password_input.rb
Serves as: :password: a poetry Field wrapping a type=password Input; the value never round-trips into the markup.
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/custom_inputs.rb
Serves as: :sensitive: a Field wrapping the masked, reveal-on-demand SensitiveInput.
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/custom_inputs.rb
Serves as: :slider and simple_form's :range: a Field wrapping the Slider.
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/string_input.rb
string/email/url/tel/search/citext: the resolved simple_form input_type IS poetry's as: vocabulary (citext folds to string).
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/custom_inputs.rb
Serves as: :switch: a Field in the setting orientation wrapping the Switch.
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/custom_inputs.rb
Serves as: :tag_group: a Field wrapping the TagGroup.
class < Poetry::SimpleForm::Inputs::Base · lib/poetry/simple_form/inputs/text_input.rb
Serves as: :text: a poetry Field wrapping the Textarea component.
class < Poetry::SimpleForm::Inputs::CollectionBase · lib/poetry/simple_form/inputs/collection_inputs.rb
Serves as: :time_zone: every ActiveSupport::TimeZone in a poetry Select, the priority zones (priority: or SimpleForm.time_zone_priority) listed first.
Returns (String) — the rendered Field HTML