I'm trying to build a formatted html string using a rails helper method, which lives in application_helper.rb.
def comment_posted_tag(actor_id,date)
... irrelevant code removed
str = "<b>" + actor_name + "</b>" + " on " + date.strftime("%d %b %Y at %H:%M")
return str.html_safe
end
I'm calling it like this in the view:
<%= comment_posted_tag(dialog_comment.actor_id,dialog_comment.updated_at) %>
For some reason the tags are not coming through. Ideally I'd like to attached a css class to the actor_name string. I've tried it with and without the html_safe but neither work.