ruby on rails - Trouble inserting code in a flash notice -



ruby on rails - Trouble inserting code in a flash notice -

i have flash notice in controller. notice includes mail_to helper method. couldn't helper work without placing view_context before it. works in browser outputs html tags string instead of processing html.

in other words, in controller have:

flash[:notice] = "blabla #{view_context.mail_to setting::email} blabla."

but when gets called see in browser's flash notice:

blabla <a href="mailto:me@example.com">me@example.com</a> blabla

any suggestions?

i.e. alter to:

flash[:notice] = "blabla #{view_context.mail_to setting::email} blabla.".html_safe

ruby-on-rails ruby-on-rails-4

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -