Files
danbooru/app/views/news_updates/_listing.html.erb
evazion facc73f23f views: don't cache news updates.
Don't fragment cache the site news banner. Caching this trades a SQL
query for a Redis call, which is unlikely to make much performance
difference to page rendering but puts high traffic volume on Redis.
2020-12-01 19:11:05 -06:00

12 lines
399 B
Plaintext

<% if NewsUpdate.recent.present? %>
<div id="news-updates" data-id="<%= NewsUpdate.recent.first.try(:id) %>" style="display: none;">
<ul>
<% NewsUpdate.recent.each do |news_update| %>
<li><%= news_update.created_at.strftime("%b %d") %>: <%= news_update.message.html_safe %></li>
<% end %>
</ul>
<a href="#" id="close-news-ticker-link">close</a>
</div>
<% end %>