Add widget feeds to homepage

Note there is some funkiness going on with class loadings
Had to create a `feed` and `widget_feed` table even though in this
first version the Widget::Feed includes only uses ActiveModel instead
of ActiveRecord, otherwise some specs failed

We’ll figure it out and clean up 😌
This commit is contained in:
rgarcia
2018-05-22 20:01:06 +02:00
committed by decabeza
parent c7f85c4173
commit 0e097973cc
13 changed files with 242 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<h1>Feeds</h1>
<% @feeds.each do |feed| %>
<div>
<strong>Most active <%= feed.kind %></strong>
</div>
<% feed.items.each do |item| %>
<div class="<%= item.class.to_s.parameterize('_') %>">
<%= item.title %>
</div>
<br/>
<% end %>
<% end %>

View File

@@ -24,6 +24,7 @@
</div>
<%= render "header", header: @header %>
<%= render "feeds" %>
<%= render "cards" %>
<% if feature?("user.recommendations") && (@recommended_debates.present? || @recommended_proposals.present?) %>