I am using the ERB engine to generate an offline HTML version of a page of my Rails website. The page shows great when shown by Rails, but I have trouble generating with ERB by myself (despite using the same ERB template).
First I was getting the error undefined method 't' and I solved it by replacing all <%=t(...)%> calls with <%=I18n.translate(...)%>.
Now I get undefined method 'raw'. Should I replace all <%=raw(...)%> calls with something else? If yes, what?
rawis defined as helper in actionpack/action_view library so that without rails you can’t use it. But ERB templating shows its output without any escaping:And because of this for purpose of escaping there is
ERB::Util#html_escapemethod