aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette
diff options
context:
space:
mode:
authorAlban Peignier2018-04-25 09:45:10 +0200
committerJohan Van Ryseghem2018-04-25 15:46:33 +0200
commit199e4eaeffe8a826f5215359494ba3cc6ac6eb8a (patch)
tree44ce5e0def40537ff1faf7bd97ebc1545ef24144 /app/models/chouette
parent2272a75da51315c5ec702a293438796c0f88ccbb (diff)
downloadchouette-core-199e4eaeffe8a826f5215359494ba3cc6ac6eb8a.tar.bz2
Move workgroup method to less global Class (TridentActiveRecord/LineReferentialSupport and StopAreaReferentialSupport) to avoid to overide existing methods. Refs #6669
Diffstat (limited to 'app/models/chouette')
-rw-r--r--app/models/chouette/trident_active_record.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/chouette/trident_active_record.rb b/app/models/chouette/trident_active_record.rb
index 18b7bbf9b..7e5140fc4 100644
--- a/app/models/chouette/trident_active_record.rb
+++ b/app/models/chouette/trident_active_record.rb
@@ -7,6 +7,11 @@ module Chouette
@referential ||= Referential.where(:slug => Apartment::Tenant.current).first!
end
+ def workgroup
+ referential&.workgroup
+ end
+
+
def hub_restricted?
referential.data_format == "hub"
end
@@ -16,4 +21,4 @@ module Chouette
end
end
-end \ No newline at end of file
+end