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/application_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/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 47b54039c..cc1c30703 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -34,7 +34,8 @@ class ApplicationController < ActionController::Base    helper_method :current_organisation    def current_functional_scope -    JSON.parse(current_organisation.sso_attributes["functional_scope"]) if current_organisation +    functional_scope = current_organisation.sso_attributes.try(:[], "functional_scope") if current_organisation +    JSON.parse(functional_scope) if functional_scope    end    helper_method :current_functional_scope | 
