I am learning Ruby and Rails.
I have a Ruby on Rails project that tracks jobs a server is running. Right now, when I manually create a new job, it announces:
<
The selected answer didn't work for me. But the answer from this post worked. I'm using Rails 4.2.4
by the way. With guidance from the answer I linked, here's how I did it:
<% flash.each do |name, msg| %>
<%= sanitize(msg) %>
<% end %>
flash[:success] = "Blah blah. #{view_context.link_to('Click this link', '/url/here')}"
The magic is the sanitize
method.
I didn't need to use .html_safe
as well.