aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinhui2017-01-03 14:59:17 +0100
committerXinhui2017-01-03 14:59:34 +0100
commit9560056852d1d48767c5ed150bce4e3abffcca00 (patch)
tree62fb71d5a7162eb9ac99805c112639eecedfcad4
parente5cbf0ccd1a38a7674721505e978d89d26083137 (diff)
downloadchouette-core-9560056852d1d48767c5ed150bce4e3abffcca00.tar.bz2
Remove stif organisation on organisation after_create callback
Refs #2230
-rw-r--r--config/initializers/stif.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/config/initializers/stif.rb b/config/initializers/stif.rb
index 1a896ba21..6a79cadc8 100644
--- a/config/initializers/stif.rb
+++ b/config/initializers/stif.rb
@@ -1,11 +1,9 @@
Rails.application.config.to_prepare do
Organisation.after_create do |organisation|
- line_referential = LineReferential.find_by(name: "CodifLigne")
+ line_referential = LineReferential.find_by(name: "CodifLigne")
stop_area_referential = StopAreaReferential.find_by(name: "Reflex")
- stif = Organisation.find_by(name: "STIF")
-
- organisation.workbenches.find_or_create_by(name: "Gestion de l'offre", organisation: stif) do |workbench|
+ organisation.workbenches.find_or_create_by(name: "Gestion de l'offre") do |workbench|
workbench.line_referential = line_referential
workbench.stop_area_referential = stop_area_referential