diff options
| author | cedricnjanga | 2017-09-05 14:26:20 +0200 |
|---|---|---|
| committer | cedricnjanga | 2017-09-05 14:36:47 +0200 |
| commit | df7552799d16d5686e389e484a00e0a7e8fb4e1d (patch) | |
| tree | a8fb56d2e41aef844cdfb5790417eaba07430fb8 /app/controllers/referentials_controller.rb | |
| parent | 70e8e93b0ebf4596c0ffd64620415db2450f4595 (diff) | |
| download | chouette-core-df7552799d16d5686e389e484a00e0a7e8fb4e1d.tar.bz2 | |
Referential#new_from :
Added params to certains paths to have the workbench_id in it.
The goal is to have the current workbench_id to assign it when do a Referential#new_from
Then I finished the use of the functional scope to avoid potential errors
I skipped some tests that hve a #TODO so we can easily find them
Diffstat (limited to 'app/controllers/referentials_controller.rb')
| -rw-r--r-- | app/controllers/referentials_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index a6dfaf2b6..bd0544a74 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -10,7 +10,6 @@ class ReferentialsController < BreadcrumbController if params[:from] source_referential = Referential.find(params[:from]) @referential = Referential.new_from(source_referential, current_functional_scope) - @referential.workbench_id = current_organisation.workbenches.first.id end new! do @@ -26,7 +25,7 @@ class ReferentialsController < BreadcrumbController def show resource.switch show! do |format| - @referential = @referential.decorate + @referential = @referential.decorate(context: { workbench_id: params[:workbench_id] } ) @reflines = lines_collection.paginate(page: params[:page], per_page: 10) @reflines = ModelDecorator.decorate( @reflines, |
