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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -