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

@@ -63,4 +63,8 @@ section "Creating Settings" do
Setting.create(key: 'map_longitude', value: -3.7)
Setting.create(key: 'map_zoom', value: 10)
Setting.create(key: 'related_content_score_threshold', value: -0.3)
Setting['feature.homepage.widgets.feeds.proposals'] = true
Setting['feature.homepage.widgets.feeds.debates'] = true
Setting['feature.homepage.widgets.feeds.processes'] = true
end

View File

@@ -0,0 +1,6 @@
class CreateWidgetFeeds < ActiveRecord::Migration
def change
create_table :widget_feeds do |t|
end
end
end

View File

@@ -0,0 +1,6 @@
class CreateFeeds < ActiveRecord::Migration
def change
create_table :feeds do |t|
end
end
end

View File

@@ -378,6 +378,9 @@ ActiveRecord::Schema.define(version: 20180519132715) do
add_index "failed_census_calls", ["user_id"], name: "index_failed_census_calls_on_user_id", using: :btree
create_table "feeds", force: :cascade do |t|
end
create_table "flags", force: :cascade do |t|
t.integer "user_id"
t.string "flaggable_type"
@@ -1236,6 +1239,9 @@ ActiveRecord::Schema.define(version: 20180519132715) do
t.datetime "updated_at", null: false
end
create_table "widget_feeds", force: :cascade do |t|
end
add_foreign_key "administrators", "users"
add_foreign_key "annotations", "legacy_legislations"
add_foreign_key "annotations", "users"

View File

@@ -125,3 +125,8 @@ Setting['map_zoom'] = 10
Setting['related_content_score_threshold'] = -0.3
Setting["feature.user.skip_verification"] = 'true'
Setting['feature.homepage.widgets.feeds.proposals'] = true
Setting['feature.homepage.widgets.feeds.debates'] = true
Setting['feature.homepage.widgets.feeds.processes'] = true