aboutsummaryrefslogtreecommitdiffstats
path: root/db/seeds
diff options
context:
space:
mode:
authorAlban Peignier2018-01-10 17:00:23 +0100
committerAlban Peignier2018-01-10 17:43:03 +0100
commit4aab6f1796ac04cf784561023a1a9f2ed8f176a1 (patch)
tree27cdcb2d53f8212d4f6f63867cd35ecd19936f94 /db/seeds
parenta9078add9036d97ede702c14b064c216365dc5b1 (diff)
downloadchouette-core-4aab6f1796ac04cf784561023a1a9f2ed8f176a1.tar.bz2
Create STIF Workgroup in seed. Associate existing Workbenchs. Refs #5499
Diffstat (limited to 'db/seeds')
-rw-r--r--db/seeds/stif.seeds.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/seeds/stif.seeds.rb b/db/seeds/stif.seeds.rb
index 464601557..c87bb7970 100644
--- a/db/seeds/stif.seeds.rb
+++ b/db/seeds/stif.seeds.rb
@@ -5,6 +5,13 @@
stop_area_referential = StopAreaReferential.find_or_create_by!(name: "Reflex", objectid_format: "stif_netex")
line_referential = LineReferential.find_or_create_by!(name: "CodifLigne", objectid_format: "stif_netex")
+workgroup = Workgroup.find_or_create_by!(name: "Gestion de l'offre théorique IDFm") do |w|
+ w.line_referential = line_referential
+ w.stop_area_referential = stop_area_referential
+end
+
+Workbench.update_all workgroup_id: workgroup
+
# Organisations
stif = Organisation.find_or_create_by!(code: "STIF") do |org|
org.name = 'STIF'