diff options
| author | Alban Peignier | 2016-11-28 10:25:40 +0100 | 
|---|---|---|
| committer | Alban Peignier | 2016-11-28 11:03:24 +0100 | 
| commit | 9b3db9a441533b159723f31f72e13322894ca30a (patch) | |
| tree | 96824cdbf49828aa87f014fd97f7113a49764d25 /app/controllers/referentials_controller.rb | |
| parent | 7353dcd212d3cc3eba1fee08dad7d12d7fcf5d29 (diff) | |
| download | chouette-core-9b3db9a441533b159723f31f72e13322894ca30a.tar.bz2 | |
Fixes Referential#init_metadatas to support multi-periods. Refs #2054
Diffstat (limited to 'app/controllers/referentials_controller.rb')
| -rw-r--r-- | app/controllers/referentials_controller.rb | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index 8a433872a..937fd0b76 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -14,7 +14,7 @@ class ReferentialsController < BreadcrumbController        @referential.workbench_id ||= params[:workbench_id]        if @referential.in_workbench? -        @referential.init_metadatas first_period_begin: Date.today, first_period_end: Date.today.advance(months: 1) +        @referential.init_metadatas default_date_range: Range.new(Date.today, Date.today.advance(months: 1))        end      end    end @@ -36,7 +36,7 @@ class ReferentialsController < BreadcrumbController    def edit      edit! do        if @referential.in_workbench? -        @referential.init_metadatas first_period_begin: Date.today, first_period_end: Date.today.advance(months: 1) +        @referential.init_metadatas default_date_range: Range.new(Date.today, Date.today.advance(months: 1))        end      end    end  | 
