Class: Avo::TurboFrameWrapperComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Avo::TurboFrameWrapperComponent
- Defined in:
- app/components/avo/turbo_frame_wrapper_component.rb
Constant Summary
Constants included from Concerns::FindAssociationField
Concerns::FindAssociationField::ASSOCIATIONS
Instance Method Summary collapse
-
#flash_content ⇒ Object
When rendering the frames the flashed content gets lost.
Methods inherited from BaseComponent
#component_name, #hotkey_badge
Methods included from ApplicationHelper
#a_button, #a_link, #body_classes, #button_classes, #chart_color, #container_classes, #d, #decode_filter_params, #e, #editor_file_path, #editor_url, #empty_state, #encode_filter_params, #frame_id, #get_model_class, #input_classes, #mount_path, #number_to_social, #possibly_rails_authentication?, #render_license_warning, #root_path_without_url, #rtl?, #text_direction, #ui, #wrap_in_modal
Methods included from ResourcesHelper
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_selector_data_attributes, #record_path, #record_title, #resource_for_record, #resource_grid, #resource_show_path, #resource_table
Methods included from Concerns::FindAssociationField
Instance Method Details
#flash_content ⇒ Object
When rendering the frames the flashed content gets lost. We’re appending it back if it’s a turbo_frame_request.
9 10 11 12 13 |
# File 'app/components/avo/turbo_frame_wrapper_component.rb', line 9 def flash_content if helpers.turbo_frame_request? helpers.turbo_stream_action_tag :append, target: "alerts", template: render(Avo::FlashAlertsComponent.new(flashes: helpers.flash)) end end |