Class: Plutonium::UI::Form::Base::Builder
- Inherits:
-
Builder
- Object
- Builder
- Plutonium::UI::Form::Base::Builder
- Includes:
- Phlexi::Field::Common::Tokens, Options::InferredTypes
- Defined in:
- lib/plutonium/ui/form/base.rb
Instance Method Summary collapse
- #easymde_tag ⇒ Object (also: #markdown_tag)
- #flatpickr_tag ⇒ Object
- #int_tel_input_tag ⇒ Object (also: #phone_tag)
- #key_value_store_tag ⇒ Object
- #secure_association_tag(**attributes) ⇒ Object (also: #belongs_to_tag, #has_many_tag, #has_one_tag)
- #secure_polymorphic_association_tag(**attributes) ⇒ Object (also: #polymorphic_belongs_to_tag)
- #slim_select_tag(**attributes) ⇒ Object
- #uppy_tag ⇒ Object (also: #file_tag, #attachment_tag)
Instance Method Details
#easymde_tag ⇒ Object Also known as: markdown_tag
13 14 15 |
# File 'lib/plutonium/ui/form/base.rb', line 13 def easymde_tag(**, &) create_component(Plutonium::UI::Form::Components::Easymde, :easymde, **, &) end |
#flatpickr_tag ⇒ Object
23 24 25 |
# File 'lib/plutonium/ui/form/base.rb', line 23 def flatpickr_tag(**, &) create_component(Components::Flatpickr, :flatpickr, **, &) end |
#int_tel_input_tag ⇒ Object Also known as: phone_tag
27 28 29 |
# File 'lib/plutonium/ui/form/base.rb', line 27 def int_tel_input_tag(**, &) create_component(Components::IntlTelInput, :int_tel_input, **, &) end |
#key_value_store_tag ⇒ Object
38 39 40 |
# File 'lib/plutonium/ui/form/base.rb', line 38 def key_value_store_tag(**, &) create_component(Components::KeyValueStore, :key_value_store, **, &) end |
#secure_association_tag(**attributes) ⇒ Object Also known as: belongs_to_tag, has_many_tag, has_one_tag
42 43 44 45 |
# File 'lib/plutonium/ui/form/base.rb', line 42 def secure_association_tag(**attributes, &) attributes[:data_controller] = tokens(attributes[:data_controller], "slim-select") # TODO: put this behind a config create_component(Components::SecureAssociation, :association, **attributes, &) end |
#secure_polymorphic_association_tag(**attributes) ⇒ Object Also known as: polymorphic_belongs_to_tag
55 56 57 58 |
# File 'lib/plutonium/ui/form/base.rb', line 55 def secure_polymorphic_association_tag(**attributes, &) attributes[:data_controller] = tokens(attributes[:data_controller], "slim-select") # TODO: put this behind a config create_component(Components::SecurePolymorphicAssociation, :polymorphic_association, **attributes, &) end |
#slim_select_tag(**attributes) ⇒ Object
18 19 20 21 |
# File 'lib/plutonium/ui/form/base.rb', line 18 def slim_select_tag(**attributes, &) attributes[:data_controller] = tokens(attributes[:data_controller], "slim-select") select_tag(**attributes, required: false, class!: "", &) end |
#uppy_tag ⇒ Object Also known as: file_tag, attachment_tag
32 33 34 |
# File 'lib/plutonium/ui/form/base.rb', line 32 def uppy_tag(**, &) create_component(Components::Uppy, :uppy, **, &) end |