diff options
| author | Zog | 2018-01-29 08:45:02 +0100 | 
|---|---|---|
| committer | Zog | 2018-01-29 08:45:02 +0100 | 
| commit | 05bc96db48a0a84fd2c50e457dc767f88950a9b4 (patch) | |
| tree | abff83921023a3f697e8ab1e3c064dd2150fc35b /app/policies | |
| parent | 22c38fb750843f0c74996175a6bd17a1f20a943c (diff) | |
| download | chouette-core-05bc96db48a0a84fd2c50e457dc767f88950a9b4.tar.bz2 | |
Refs #5750 @1h; Manage non-commercial StopAreas
- Add a `kind` attribute
- Hide irrelevant fields in the form
Diffstat (limited to 'app/policies')
| -rw-r--r-- | app/policies/stop_area_policy.rb | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/app/policies/stop_area_policy.rb b/app/policies/stop_area_policy.rb index 6db48b702..fd73b7092 100644 --- a/app/policies/stop_area_policy.rb +++ b/app/policies/stop_area_policy.rb @@ -3,7 +3,7 @@ class StopAreaPolicy < ApplicationPolicy      def search_scope scope_name        scope = resolve        if scope_name&.to_s == "route_editor" -        scope = scope.where(area_type: 'zdep') unless user.organisation.has_feature?("route_stop_areas_all_types") +        scope = scope.where("kind = ? OR area_type = ?", :non_commercial, 'zdep') unless user.organisation.has_feature?("route_stop_areas_all_types")        end        scope      end | 
