Open chevinbrown opened 8 years ago
Yeah, I can confirm that. There is definitely some interference with Turbolinks 5.0.0
It still doesn't show flash message with turbolinks 5.0.1 (rails 5.1.4) when I use 'redirect_to' but it shows flash message if I use 'data: {turbolinks: false}' to link_to method. Anybody have some hint?
Seems like this gem isn't actively maintained. I recommend you take a look at the unobtrusive flash gem
@kikikiblue try to use ActionDispatch::Flash::FlashHash#keep method.
@estum I tried this code. but it does not show the notice flash message either.
flash.keep
return redirect_back(fallback_location: root_path), flash: {notice: 'Email sent'}
what is the right usage?
I was stupid. :-p
flash[:notice] = 'Email sent'
flash.keep
return redirect_back(fallback_location: root_path)
It works with this code. Thanks @estum
It looks like turbolinks interferes with the operation of this gem. I haven't dug in yet. Is there a fix for Rails5/Turbolinks3?