I am using a decorator for an object called @menu
to render a link in my view. I am also using Draper gem for my decorators.
In my decorator, I have something in the lines of:
def link
link_to model.name + icon("external-link"), model.url
end
But when I call this in my view using @menu.link
, the html tag for <i>
will be literally displayed on the page, instead of being processed.
By the way, I can render the same html by using a helper from the font-awesome gem: icon("external-link")
. But it will yield the same result. Could anyone show me how to properly render the html in this case?