I had the following problem: I have rhtml (html, shredded together with ruby inside the <%%> and <% =%> tags), which is stored in the database that I want to display. Information received by request. I need to evaluate the information that I get from the database, as if it were regular content inside the .erb file. What I have now:
<% @mymods.each do |mod| %>
<%= render_text(mod["html"])%>
<% end %>
Where mod ["html"] is a variable containing the rhtml code and @mymods array of objects from the request. Currently I do not know which function I should use (render_text, of course, does not work).
Help is appreciated.
/ Tzer0
source
share