First of all get the Toastr sources. I opted to link to them on CDNJS:
Next I defined some extra flash types in my
application_controller.rb file to match Toastr's native notification types and enable use of the built-in styling.
class ApplicationController < ActionController::Base add_flash_types :success, :info, :warning, :error ...
Lines 2 and 3 establish a mapping from conventional Rails
alert so that I don't have to hack libraries like Devise which rely on them.