diff options
| author | Xinhui | 2017-07-21 14:13:17 +0200 | 
|---|---|---|
| committer | Xinhui | 2017-07-21 14:13:22 +0200 | 
| commit | 92d1abd1ef31a357260b5cb629dfed9559dd53fb (patch) | |
| tree | 0cf14396245da35a39ad69059fe8cfadddaf9c6d /app/models/referential.rb | |
| parent | 7b297ba1410e82ea3d38f2be3c2d34596e52306a (diff) | |
| download | chouette-core-92d1abd1ef31a357260b5cb629dfed9559dd53fb.tar.bz2 | |
Fix cloned ref should belong to current user organisation
Refs #4132
Diffstat (limited to 'app/models/referential.rb')
| -rw-r--r-- | app/models/referential.rb | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/app/models/referential.rb b/app/models/referential.rb index e65d6a33b..cb2c7b23b 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -130,14 +130,13 @@ class Referential < ActiveRecord::Base      self    end -  def self.new_from(from, organisation:) +  def self.new_from(from)      Referential.new(        name: I18n.t("activerecord.copy", :name => from.name),        slug: "#{from.slug}_clone",        prefix: from.prefix,        time_zone: from.time_zone,        bounds: from.bounds, -      organisation: organisation,        line_referential: from.line_referential,        stop_area_referential: from.stop_area_referential,        workbench: from.workbench, @@ -206,7 +205,6 @@ class Referential < ActiveRecord::Base    end    def clone_associations -    self.organisation          = created_from.organisation      self.line_referential      = created_from.line_referential      self.stop_area_referential = created_from.stop_area_referential      self.workbench             = created_from.workbench | 
