diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index cc36569c8..940771d5b 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -64,8 +64,8 @@ section "Creating Settings" do Setting.create(key: 'verification_offices_url', value: 'http://oficinas-atencion-ciudadano.url/') Setting.create(key: 'min_age_to_participate', value: '16') Setting.create(key: 'proposal_improvement_path', value: nil) - Setting.create(key: 'map_latitude', value: 51.48) - Setting.create(key: 'map_longitude', value: 0.0) + Setting.create(key: 'map_latitude', value: 40.41) + 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) end @@ -451,6 +451,17 @@ section "Creating Investments" do end end +section "Geolocating Investments" do + Budget.all.each do |budget| + budget.investments.each do |investment| + MapLocation.create(latitude: 40.4167278 + rand(-10..10)/100.to_f, + longitude: -3.7055274 + rand(-10..10)/100.to_f, + zoom: 10, + investment_id: investment.id) + end + end +end + section "Balloting Investments" do Budget.balloting.last.investments.each do |investment| investment.update(selected: true, feasibility: "feasible")