I wrote the following code to display the show.html.erb view with an alert flash message:
render action: 'show', alert: 'Please fix mistakes outlined in red'
However, the alert doesn’t appear. Notices appear though. I assume my render action: 'show' call above is wrong as I wrote that just by intuition. This is my html.erb code:
<%if notice%><p id="notice"><%= notice %></p><%end%>
<%if alert%><p id="alert"><%= alert %></p><%end%>
A more standard way of dealing with flashes is to write the following in your view layout
and write the following in your controller