diff options
| author | Guillaume | 2017-11-13 12:30:31 +0100 |
|---|---|---|
| committer | Guillaume | 2017-11-13 12:30:31 +0100 |
| commit | 926a7593b829b974870c881e4a6b3f213226da1b (patch) | |
| tree | 1cd4b93bb9c798b5840f9aba721e92e68e0b1f51 | |
| parent | 834a486b3c0cd9d2dbdae3588d9464f2f9d7287e (diff) | |
| download | chouette-core-926a7593b829b974870c881e4a6b3f213226da1b.tar.bz2 | |
update objectid_format directly
| -rw-r--r-- | db/seeds/chouette.seeds.rb | 8 | ||||
| -rw-r--r-- | db/seeds/stif.seeds.rb | 9 |
2 files changed, 4 insertions, 13 deletions
diff --git a/db/seeds/chouette.seeds.rb b/db/seeds/chouette.seeds.rb index 75208f0fe..6adafa3e9 100644 --- a/db/seeds/chouette.seeds.rb +++ b/db/seeds/chouette.seeds.rb @@ -2,8 +2,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). -stop_area_referential = StopAreaReferential.find_or_create_by!(name: "Reflex") -line_referential = LineReferential.find_or_create_by!(name: "CodifLigne") +stop_area_referential = StopAreaReferential.find_or_create_by!(name: "Reflex", objectid_format: "netex") +line_referential = LineReferential.find_or_create_by!(name: "CodifLigne", objectid_format: "netex") # Organisations stif = Organisation.find_or_create_by!(code: "STIF") do |org| @@ -36,7 +36,3 @@ end # Include all Lines in organisation functional_scope stif.update sso_attributes: { functional_scope: line_referential.lines.pluck(:objectid) } operator.update sso_attributes: { functional_scope: line_referential.lines.limit(3).pluck(:objectid) } - -# Set type of objectid_format -line_referential.update objectid_format: "netex" -stop_area_referential.update objectid_format: "netex" diff --git a/db/seeds/stif.seeds.rb b/db/seeds/stif.seeds.rb index 8674958ab..464601557 100644 --- a/db/seeds/stif.seeds.rb +++ b/db/seeds/stif.seeds.rb @@ -2,8 +2,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). -stop_area_referential = StopAreaReferential.find_or_create_by!(name: "Reflex") -line_referential = LineReferential.find_or_create_by!(name: "CodifLigne") +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") # Organisations stif = Organisation.find_or_create_by!(code: "STIF") do |org| @@ -36,8 +36,3 @@ end # Include all Lines in organisation functional_scope stif.update sso_attributes: { functional_scope: line_referential.lines.pluck(:objectid) } operator.update sso_attributes: { functional_scope: line_referential.lines.limit(3).pluck(:objectid) } - -# Set type of objectid_format -line_referential.update objectid_format: "stif_netex" -stop_area_referential.update objectid_format: "stif_netex" - |
