demarches-normaliennes/app/views/layouts/application.turbo_stream.haml

10 lines
336 B
Text
Raw Normal View History

2022-04-14 20:46:28 +02:00
- if flash.any?
2024-10-23 14:57:55 +02:00
- unique_classname= "u#{SecureRandom.hex}"
= turbo_stream.replace 'flash_messages', partial: 'layouts/flash_messages', locals: { unique_classname: }
= turbo_stream.focus 'flash_messages'
= turbo_stream.show 'flash_messages'
2024-10-23 14:57:55 +02:00
= turbo_stream.hide_all ".#{unique_classname}", delay: 15000
2022-04-14 20:46:28 +02:00
- flash.clear
= yield