Joined March 2015
·

An

103 A4 Street, 12 Wards, Tan Binh Disc, TP HCM
·
·

def custombootstrapflash
flashmessages = []
flash.each do |type, message|
type = :success if type == :notice
type = :error if type == :alert
text = "<script>toastr.#{type}('#{message}');</script>"
flash
messages << text.htmlsafe if message
end
flash
messages.join("\n").html_safe
end

-----> Will don't show any things.
If you want to use
You must put

type = type.to_sym

before
type = 'success' if type == 'notice'

Achievements
1 Karma
0 Total ProTip Views