Class: Avo::TurboFrameWrapperComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Avo::TurboFrameWrapperComponent
- Defined in:
- app/components/avo/turbo_frame_wrapper_component.rb
Instance Method Summary collapse
-
#flash_content ⇒ Object
When rendering the frames the flashed content gets lost.
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 |