diff options
| author | Zog | 2018-01-31 10:46:02 +0100 |
|---|---|---|
| committer | cedricnjanga | 2018-02-06 11:04:59 -0800 |
| commit | aa4fa0970e35920e7e1553112fc2d1f792abe05d (patch) | |
| tree | 4b3fdfc7dd94d4a1ab19d52f3db270c49379b851 /app/models | |
| parent | c539b09d834476a36804072a92f8c2c373aa487b (diff) | |
| download | chouette-core-aa4fa0970e35920e7e1553112fc2d1f792abe05d.tar.bz2 | |
Refs #5750; Fix validation
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/chouette/stop_area.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb index 75a4a34bb..ad42d54ae 100644 --- a/app/models/chouette/stop_area.rb +++ b/app/models/chouette/stop_area.rb @@ -60,7 +60,8 @@ module Chouette end def area_type_of_right_kind - unless Chouette::AreaType.send(self.kind).include?(self.area_type) + + unless Chouette::AreaType.send(self.kind).map(&:to_s).include?(self.area_type) errors.add(:area_type, I18n.t('stop_areas.errors.incorrect_kind_area_type')) end end |
