module TurboFlash::FlashHash
Public Instance Methods
turbo()
click to toggle source
create a Flash::Turbo instance.
Behaves just like `flash.now`, but gets injected into your TurboStream response.
flash.turbo[:notice] = "There was an error"
# File lib/turbo_flash/flash_hash.rb, line 12 def turbo @turbo ||= ::TurboFlash::FlashTurbo.new(self) end
turbo!(options = {})
click to toggle source
Copy over flashes
# File lib/turbo_flash/flash_hash.rb, line 17 def turbo!(options = {}) turbo.from_flashes(@flashes, options) true end