Flash Messages

Episode #465 by Teacher's Avatar David Kimura

Summary

Flash messages are used to provide feedback to users when certain actions occur, such as creating or updating a record. In this episode, we'll look at various issues with flash messages and workarounds to common problems.
rails view turbo 13:48

Chapters

  • Introduction (0:00)
  • Creating the flash partial (0:56)
  • Identifying the problem (3:23)
  • Fixing the flash messages on create or update (4:20)
  • Second attempt to fix flash messages (5:18)
  • Rendering a turbo stream (5:46)
  • Auto closing flash messages (7:18)
  • Fading the flash message (8:37)
  • CSS Fade approach (11:04)
  • Displaying what went wrong (12:24)
  • Final thoughts (13:29)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
$ 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams