Adding HTML to ruby on rails flash message -


i have flash[:success] message goes this:

flash[:success] = "this text bold.". however, when go make text bold, wraps html characters around message, rather turning bold.

<b>this text bold</b> 

how can go including html flash messages?

use <%= flash[:success].html_safe %> . has been suggested kyle. want add points it. whenever flash[:success] blank, show error due html_safe. better use condition it. try with

<%= flash[:success].html_safe unless flash[:success].blank? %> 

Comments