Module: Plutonium::UI::Form::Concerns::TypeaheadAttributes
- Extended by:
- ActiveSupport::Concern
- Included in:
- Plutonium::UI::Form::Components::ResourceSelect, Plutonium::UI::Form::Components::SecureAssociation
- Defined in:
- lib/plutonium/ui/form/concerns/typeahead_attributes.rb
Overview
Shared typeahead wiring for association/resource select components.
Hosts must implement two hooks:
typeahead_target_class -> the associated model class, or nil
(returns nil for polymorphic/unknown)
typeahead_kind_and_name(opt) -> [:input | :filter, Symbol], used when
the consumer didn't pass an explicit
`typeahead: {kind:, name:}` hash
The concern owns:
- `configure_typeahead_attributes!` — call from `before_template`
- `typeahead_searchable?` — registry + fallback-column check
- `typeahead_url_for` — engine route helper lookup