Toasts
Diet Rails uses Rails` Flash message functionality to send toasts from the backend to the frontend.
flash.now[:toasts] = [
{ title: 'Post Created', message: 'Your post has been successfully created.', style: "success" }
]
Info
- Toast styling comes from base-styles.
- The html responsible for toasts lives in
/views/shared/_partial_containers.html.erb
and/views/shared/_toast.html.erb
.