I'm trying to style some words bold inside of this ruby string, which is inside of a ruby expression, which is inside of an html element. I want the current_user.email text to be bold, but not the rest of the text.
<li>"><%= link_to "Sign out of #{current_user.email}", sign_out_path %></li>
How would I go about this?
You can use raw
<li><%= link_to raw("Sign out of <strong>#{current_user.email}</strong>"), sign_out_path %></li>
Here is the docs : https://edgeguides.rubyonrails.org/active_support_core_extensions.html#output-safety