Default dev seeds geolocation at madrid, and geolocate all investments
This commit is contained in:
@@ -64,8 +64,8 @@ section "Creating Settings" do
|
|||||||
Setting.create(key: 'verification_offices_url', value: 'http://oficinas-atencion-ciudadano.url/')
|
Setting.create(key: 'verification_offices_url', value: 'http://oficinas-atencion-ciudadano.url/')
|
||||||
Setting.create(key: 'min_age_to_participate', value: '16')
|
Setting.create(key: 'min_age_to_participate', value: '16')
|
||||||
Setting.create(key: 'proposal_improvement_path', value: nil)
|
Setting.create(key: 'proposal_improvement_path', value: nil)
|
||||||
Setting.create(key: 'map_latitude', value: 51.48)
|
Setting.create(key: 'map_latitude', value: 40.41)
|
||||||
Setting.create(key: 'map_longitude', value: 0.0)
|
Setting.create(key: 'map_longitude', value: -3.7)
|
||||||
Setting.create(key: 'map_zoom', value: 10)
|
Setting.create(key: 'map_zoom', value: 10)
|
||||||
Setting.create(key: 'related_content_score_threshold', value: -0.3)
|
Setting.create(key: 'related_content_score_threshold', value: -0.3)
|
||||||
end
|
end
|
||||||
@@ -451,6 +451,17 @@ section "Creating Investments" do
|
|||||||
end
|
end
|
||||||
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
|
section "Balloting Investments" do
|
||||||
Budget.balloting.last.investments.each do |investment|
|
Budget.balloting.last.investments.each do |investment|
|
||||||
investment.update(selected: true, feasibility: "feasible")
|
investment.update(selected: true, feasibility: "feasible")
|
||||||
|
|||||||
Reference in New Issue
Block a user