aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorRobert2017-06-12 14:45:29 +0200
committerRobert2017-06-12 14:45:29 +0200
commit2456631de1cd89bd4ec57da1249d90ce090d4528 (patch)
treea80065c5cee4ba47725d154b1c29817b861869b1 /app/models
parenta4d78068ea6aa0f12217e27e4da1db408fa9f39f (diff)
downloadchouette-core-2456631de1cd89bd4ec57da1249d90ce090d4528.tar.bz2
Refs: #3603@4h, hotfix
Diffstat (limited to 'app/models')
-rw-r--r--app/models/referential.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/referential.rb b/app/models/referential.rb
index 824320c27..22bfe0d25 100644
--- a/app/models/referential.rb
+++ b/app/models/referential.rb
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
class Referential < ActiveRecord::Base
include DataFormatEnumerations
@@ -180,7 +179,7 @@ class Referential < ActiveRecord::Base
before_validation :assign_line_and_stop_area_referential, :on => :create, if: :workbench, unless: :created_from
before_validation :clone_associations, :on => :create, if: :created_from
- before_create :create_schema
+ before_create :create_schema, unless: :created_from
after_create :clone_schema, if: :created_from
@@ -282,7 +281,7 @@ class Referential < ActiveRecord::Base
end
def clone_schema
- ReferentialCloning.create(source_referential: self.created_from, target_referential: self)
+ ReferentialCloning.create(source_referential: created_from, target_referential: self)
end
def create_schema