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

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

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