Module: Avo::TurboStreamActionsHelper
- Defined in:
- app/helpers/avo/turbo_stream_actions_helper.rb
Instance Method Summary collapse
- #avo_close_modal ⇒ Object
- #avo_download(content:, filename:) ⇒ Object
- #avo_flash_alerts ⇒ Object
- #avo_turbo_reload ⇒ Object
Instance Method Details
#avo_close_modal ⇒ Object
13 14 15 16 17 |
# File 'app/helpers/avo/turbo_stream_actions_helper.rb', line 13 def avo_close_modal turbo_stream_action_tag :replace, target: Avo::MODAL_FRAME_ID, template: @view_context.turbo_frame_tag(Avo::MODAL_FRAME_ID) end |
#avo_download(content:, filename:) ⇒ Object
3 4 5 |
# File 'app/helpers/avo/turbo_stream_actions_helper.rb', line 3 def avo_download(content:, filename:) turbo_stream_action_tag :download, content: content, filename: filename end |
#avo_flash_alerts ⇒ Object
7 8 9 10 11 |
# File 'app/helpers/avo/turbo_stream_actions_helper.rb', line 7 def avo_flash_alerts turbo_stream_action_tag :append, target: "alerts", template: @view_context.render(Avo::FlashAlertsComponent.new(flashes: @view_context.flash.discard)) end |
#avo_turbo_reload ⇒ Object
19 20 21 |
# File 'app/helpers/avo/turbo_stream_actions_helper.rb', line 19 def avo_turbo_reload turbo_stream_action_tag :turbo_reload end |