diff options
| author | Zog | 2018-02-01 15:56:32 +0100 |
|---|---|---|
| committer | cedricnjanga | 2018-02-06 11:10:19 -0800 |
| commit | eec283434fac6110149eadf9e468cc37aa9981d1 (patch) | |
| tree | 8a9e1013caecf1a50ff6fc642794c6c0483637e4 /app | |
| parent | 21b42cc6ed91aeb24ead3b3daca31f256ccf9758 (diff) | |
| download | chouette-core-eec283434fac6110149eadf9e468cc37aa9981d1.tar.bz2 | |
Refs #5758; Set a default kind for StopAreas
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/chouette/stop_area.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb index bb8747faa..cf2afbc73 100644 --- a/app/models/chouette/stop_area.rb +++ b/app/models/chouette/stop_area.rb @@ -47,6 +47,10 @@ module Chouette validate :parent_area_type_must_be_greater validate :area_type_of_right_kind + after_initialize do + self.kind ||= :commercial + end + def self.nullable_attributes [:registration_number, :street_name, :country_code, :fare_code, :nearest_topic_name, :comment, :long_lat_type, :zip_code, :city_name, :url, :time_zone] |
