Files
fizzy/app/controllers/concerns/turbo_flash.rb
T
David Heinemeier Hansson cf503bfba3 Prefer templates for turbo streams in all but the very simplest cases
(And probably even then)
2025-11-02 20:20:01 +01:00

13 lines
278 B
Ruby

module TurboFlash
extend ActiveSupport::Concern
included do
helper_method :turbo_stream_flash
end
private
def turbo_stream_flash(**flash_options)
turbo_stream.replace(:flash, partial: "layouts/shared/flash", locals: { flash: flash_options })
end
end