Add healthy debate flare tag and sidebar widget (#449)
This commit is contained in:
parent
bbd9aef3cc
commit
992c95ff25
2 changed files with 17 additions and 1 deletions
|
|
@ -5,12 +5,14 @@ class FlareTag
|
|||
end
|
||||
|
||||
def tag
|
||||
Rails.cache.fetch("article_flare_tag-#{article.id}-#{article.updated_at}", expires_in: 12.hours) do
|
||||
Rails.cache.
|
||||
fetch("article_flare_tag-#{article.id}-#{article.updated_at}", expires_in: 12.hours) do
|
||||
flares = ["explainlikeimfive",
|
||||
"ama",
|
||||
"techtalks",
|
||||
"help",
|
||||
"news",
|
||||
"healthydebate",
|
||||
"showdev",
|
||||
"challenge",
|
||||
"anonymous",
|
||||
|
|
|
|||
|
|
@ -204,6 +204,20 @@
|
|||
<a class="cta cta-button" href="/new/explainlikeimfive">ASK FOR AN EXPLANATION</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget">
|
||||
<header>
|
||||
<a href="/t/healthydebate">#healthydebate</a>
|
||||
</header>
|
||||
<div class="widget-body">
|
||||
<div class="widget-link-list">
|
||||
<% Article.active_threads(["healthydebate"], Timeframer.new(params[:timeframe]).datetime).
|
||||
each do |plucked_article| %>
|
||||
<%= render "articles/widget_list_item", plucked_article: plucked_article, show_comment_count: true %>
|
||||
<% end %>
|
||||
</div>
|
||||
<a class="cta cta-button" href="/new/healthydebate">START A DEBATE</a>
|
||||
</div>
|
||||
</div>
|
||||
<% if user_signed_in? %>
|
||||
<div class="widget" id="podcast-widget">
|
||||
<header>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue