I searched but couldn't find a straightforward answer. I would like to be able to see which partial generated a certain piece of HTML. So when in a view I would say:
<%= render :partial => 'stackoverflow', locals: { answers: "johny be good" } %>
with e.g. app/views/_stackoverflow.html.erb
containing
<p><%= answers %></p>
<hr>
that the resulting HTML would inject a html comment with the name of the rendered partial like:
<!-- partial: 'app/views/_stackoverflow.html.erb' -->
<p>johny be good</p>
<hr>
I assume there is a configuration option for this, but can't seem to find anything.
I know that the rendered partials are shown in the rails server log, but that is not what I am looking for.
Any help would be greatly appreciated.