aboutsummaryrefslogtreecommitdiffstats
path: root/db/seeds.rb
diff options
context:
space:
mode:
authorAlban Peignier2016-05-13 16:53:13 +0200
committerAlban Peignier2016-05-13 16:53:30 +0200
commit2cb49d26214f9082fa00fe58ee1c1388e45a34ed (patch)
treef15d5d25279a24a310a25b59a112c2cded69d7b8 /db/seeds.rb
parent6045f57aa95fbd1d45f33180639bbf322b7ec2ab (diff)
downloadchouette-core-2cb49d26214f9082fa00fe58ee1c1388e45a34ed.tar.bz2
Refactor controllers to manage StopAreas in StopAreaReferential. Refs #821
Diffstat (limited to 'db/seeds.rb')
-rw-r--r--db/seeds.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/db/seeds.rb b/db/seeds.rb
index e662bb18f..1b8135958 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -1,3 +1,4 @@
+# coding: utf-8
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
@@ -7,16 +8,21 @@
# Mayor.create(:name => 'Emanuel', :city => cities.first)
stif = Organisation.find_or_create_by(name: "STIF")
-StopAreaReferential.find_or_create_by(name: "Reflex") do |referential|
+
+stop_area_referential = StopAreaReferential.find_or_create_by(name: "Reflex") do |referential|
referential.add_member stif, owner: true
end
+10.times do |n|
+ stop_area_referential.stop_areas.find_or_create_by name: "Test #{n}", area_type: "Quay"
+end
+
line_referential = LineReferential.find_or_create_by(name: "CodifLigne") do |referential|
referential.add_member stif, owner: true
end
10.times do |n|
- line_referential.lines.find_or_create_by name: "Ligne Test #{n}"
+ line_referential.lines.find_or_create_by name: "Test #{n}"
end
OfferWorkbench.find_or_create_by(name: "Gestion de l'offre", organisation: stif) \ No newline at end of file