How would one go about turning the following code into the latter?

```
<div id="faqs">
  <% if @faqs.length > 0 %>
    <% @faqs.each do |faq| %>
      <div class="faq">
        <strong>Q:</strong> <%= faq.question %>
        <br />
        <strong>A:</strong> <%= faq.answer %>
      </div>
    <% end %>
  <% else %>
    <p>No FAQs to display.</p>
  <% end %>
</div>

<div id="faqs">
  <% @faqs.empty? ? content_tag(:p, "No FAQs to display.") : @faqs.each do |faq| %>
    <div class="faq">
      <strong>Q:</strong> <%= faq.question %>
      <br />
      <strong>A:</strong> <%= faq.answer %>
    </div>
  <% end %>
</div>

```

I'm curious as to whether I can get the latter code to work. The only element of it that is failing at the moment is that the `content_tag()` is not displaying - this is due to the fact that I'm not using printable ruby tags (`<%= # %>`) but using them will dump out the FAQ objects underneath the content.

I considered the use of `puts()` to print the `content_tag()` while inside the ruby tags but that didn't work.

I've tried to search for this issue but haven't yielded anything useful.

Is this achievable and if so, does it have any benefits other than being prettier?