app/helpers/trestle/flash_helper.rb in trestle-0.9.8 vs app/helpers/trestle/flash_helper.rb in trestle-0.10.0.pre

- old
+ new

@@ -9,7 +9,17 @@ end def instance_has_errors? instance.errors.any? rescue false end + + def turbo_stream_update_flash + <<-EOF + <turbo-stream action="update" target="flash"> + <template> + #{render_to_string(partial: "trestle/flash/flash", formats: [:html])} + </template> + </turbo-stream> + EOF + end end end