Sha256: acbe8ae93625372eecd1e104604999a999855838e9c80a4a882d421a00d46eb5

Contents?: true

Size: 636 Bytes

Versions: 30

Compression:

Stored size: 636 Bytes

Contents

module Avo
  module TurboStreamActionsHelper
    def avo_download(content:, filename:)
      turbo_stream_action_tag :download, content: content, filename: filename
    end

    def avo_flash_alerts
      turbo_stream_action_tag :append,
        target: "alerts",
        template: @view_context.render(Avo::FlashAlertsComponent.new(flashes: @view_context.flash.discard))
    end

    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
  end
end

Turbo::Streams::TagBuilder.prepend(Avo::TurboStreamActionsHelper)

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
avo-3.17.9.tw4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.9 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.8.tw4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.8 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.7 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.6.tw4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.6 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.5 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.3 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.5.tw4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.4.tw4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.3.tw4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.2.tw4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.2 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.1.tw4 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.1 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.17.0 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.16.6 app/helpers/avo/turbo_stream_actions_helper.rb
avo-3.16.5 app/helpers/avo/turbo_stream_actions_helper.rb