Merge branch 'master' into 1647-locale_site_customization

This commit is contained in:
María Checa
2017-07-02 23:19:40 +02:00
committed by GitHub
160 changed files with 593 additions and 637 deletions

View File

@@ -130,21 +130,21 @@ not_org_users = User.where(['users.id NOT IN(?)', org_user_ids])
puts ""
print "Creating Tags Categories"
ActsAsTaggableOn::Tag.create!(name: "Asociaciones", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Cultura", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Deportes", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Derechos Sociales", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Economía", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Empleo", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Equidad", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Sostenibilidad", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Participación", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Movilidad", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Medios", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Salud", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Transparencia", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Seguridad y Emergencias", featured: true, kind: "category")
ActsAsTaggableOn::Tag.create!(name: "Medio Ambiente", featured: true, kind: "category")
ActsAsTaggableOn::Tag.category.create!(name: "Asociaciones")
ActsAsTaggableOn::Tag.category.create!(name: "Cultura")
ActsAsTaggableOn::Tag.category.create!(name: "Deportes")
ActsAsTaggableOn::Tag.category.create!(name: "Derechos Sociales")
ActsAsTaggableOn::Tag.category.create!(name: "Economía")
ActsAsTaggableOn::Tag.category.create!(name: "Empleo")
ActsAsTaggableOn::Tag.category.create!(name: "Equidad")
ActsAsTaggableOn::Tag.category.create!(name: "Sostenibilidad")
ActsAsTaggableOn::Tag.category.create!(name: "Participación")
ActsAsTaggableOn::Tag.category.create!(name: "Movilidad")
ActsAsTaggableOn::Tag.category.create!(name: "Medios")
ActsAsTaggableOn::Tag.category.create!(name: "Salud")
ActsAsTaggableOn::Tag.category.create!(name: "Transparencia")
ActsAsTaggableOn::Tag.category.create!(name: "Seguridad y Emergencias")
ActsAsTaggableOn::Tag.category.create!(name: "Medio Ambiente")
puts ""
print "Creating Debates"
@@ -390,7 +390,8 @@ Budget::PHASES.each_with_index do |phase, i|
geozones = Geozone.reorder("RANDOM()").limit([2, 5, 6, 7].sample)
geozones.each do |geozone|
group.headings << group.headings.create!(name: geozone.name,
price: rand(1..100) * 100000)
price: rand(1..100) * 100000,
population: rand(1..50) * 10000)
end
end
end
@@ -650,7 +651,8 @@ print "Creating legislation processes"
debate_phase_enabled: true,
allegations_phase_enabled: true,
draft_publication_enabled: true,
result_publication_enabled: true
result_publication_enabled: true,
published: true
)
end

View File

@@ -0,0 +1,5 @@
class AddPopulationToBudgetHeadings < ActiveRecord::Migration
def change
add_column :budget_headings, :population, :integer, default: nil
end
end

View File

@@ -0,0 +1,5 @@
class RemoveFeaturedFromTags < ActiveRecord::Migration
def change
remove_column :tags, :featured, :boolean, default: false
end
end

View File

@@ -0,0 +1,5 @@
class AddPublishedToLegislationProcesses < ActiveRecord::Migration
def change
add_column :legislation_processes, :published, :boolean, default: true
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170702105956) do
ActiveRecord::Schema.define(version: 20170626081337) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -110,6 +110,7 @@ ActiveRecord::Schema.define(version: 20170702105956) do
t.integer "group_id"
t.string "name", limit: 50
t.integer "price", limit: 8
t.integer "population"
end
add_index "budget_headings", ["group_id"], name: "index_budget_headings_on_group_id", using: :btree
@@ -428,6 +429,7 @@ ActiveRecord::Schema.define(version: 20170702105956) do
t.boolean "allegations_phase_enabled", default: false
t.boolean "draft_publication_enabled", default: false
t.boolean "result_publication_enabled", default: false
t.boolean "published", default: true
end
add_index "legislation_processes", ["allegations_end_date"], name: "index_legislation_processes_on_allegations_end_date", using: :btree
@@ -841,7 +843,6 @@ ActiveRecord::Schema.define(version: 20170702105956) do
create_table "tags", force: :cascade do |t|
t.string "name", limit: 40
t.integer "taggings_count", default: 0
t.boolean "featured", default: false
t.integer "debates_count", default: 0
t.integer "proposals_count", default: 0
t.integer "spending_proposals_count", default: 0