diff options
| author | Xinhui | 2016-11-08 16:00:39 +0100 |
|---|---|---|
| committer | Xinhui | 2016-11-08 16:00:39 +0100 |
| commit | f07d997e80a59d12c98798da015bae36b3af66d2 (patch) | |
| tree | 2112b8299f92f2ec7aa76922e406726b7f5305c8 /app | |
| parent | 9418590690f14907b87fe22376281bd1bf3cb5a3 (diff) | |
| download | chouette-core-f07d997e80a59d12c98798da015bae36b3af66d2.tar.bz2 | |
MyWorkBenchScopes
Refs #1787
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/organisation.rb | 2 | ||||
| -rw-r--r-- | app/models/workbench.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/organisation.rb b/app/models/organisation.rb index f98de567e..31443d1c7 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -43,7 +43,7 @@ class Organisation < ActiveRecord::Base org = Organisation.find_or_initialize_by(code: code) if scope org.sso_attributes ||= {} - org.sso_attributes[:functional_scope] = scope.delete('\\"') + org.sso_attributes[:functional_scope] = scope end org.name = name org.synced_at = Time.now diff --git a/app/models/workbench.rb b/app/models/workbench.rb index adc0041dd..f02c6a5a1 100644 --- a/app/models/workbench.rb +++ b/app/models/workbench.rb @@ -3,7 +3,7 @@ class Workbench < ActiveRecord::Base belongs_to :line_referential belongs_to :stop_area_referential - has_many :lines, through: :line_referential + has_many :lines, -> (workbench) { Stif::MyWorkbenchScopes.new(workbench).line_scope }, through: :line_referential has_many :networks, through: :line_referential has_many :companies, through: :line_referential has_many :group_of_lines, through: :line_referential |
