[openstreetmap/openstreetmap-website] Flash support for :alert (#2743)

Brian DeRocher notifications at github.com
Sun Aug 2 01:14:03 UTC 2020

These days it seems there are two conventional types of flashes: notices and alerts.  After switching one of my notices to an alert, I noticed it did not appear on the following page.

It looks like app/views/layouts/_flash.html.erb only handle :error, :warning, and :notice.

I actually like :error and :warning better than :alert.

Do you think we should add support for :alert in _flash.html.erb, or should I just use the types of flashes we have defined.  The only downside I see is code becomes a little more verbose.

      redirect_to @thing, :flash => { :error => "It failed." }
      redirect_to @thing, :alert => "It failed."

:alert and :notice become somewhat conventional in gems/actionpack- line 11, though other flashes are supports on line 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200801/c03a608b/attachment.htm>

More information about the rails-dev mailing list