diff options
| author | Alban Peignier | 2017-12-20 22:48:53 +0100 | 
|---|---|---|
| committer | GitHub | 2017-12-20 22:48:53 +0100 | 
| commit | ac7df56835a10b729e0369fe6edbe2a1cb57927e (patch) | |
| tree | ef9383710e2f3f1af3c0a46a5405c562a10edf79 /app/models/chouette/stop_area.rb | |
| parent | e0cdfc6c4af6de03123faeffc5f79df68c8e42b8 (diff) | |
| parent | c955658d634c5975af446ca9885903ff8fa2c0a9 (diff) | |
| download | chouette-core-ac7df56835a10b729e0369fe6edbe2a1cb57927e.tar.bz2 | |
Merge pull request #170 from af83/5351-stop-area-waiting-time
Add StopArea#waiting_time with support in stop_areas#index/show. Refs #5351 
Diffstat (limited to 'app/models/chouette/stop_area.rb')
| -rw-r--r-- | app/models/chouette/stop_area.rb | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb index f216ce449..3a9b44d59 100644 --- a/app/models/chouette/stop_area.rb +++ b/app/models/chouette/stop_area.rb @@ -39,6 +39,8 @@ module Chouette      validates_format_of :coordinates, :with => %r{\A *-?(0?[0-9](\.[0-9]*)?|[0-8][0-9](\.[0-9]*)?|90(\.[0]*)?) *\, *-?(0?[0-9]?[0-9](\.[0-9]*)?|1[0-7][0-9](\.[0-9]*)?|180(\.[0]*)?) *\Z}, :allow_nil => true, :allow_blank => true      validates_format_of :url, :with => %r{\Ahttps?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?\Z}, :allow_nil => true, :allow_blank => true +    validates_numericality_of :waiting_time, greater_than_or_equal_to: 0, only_integer: true, if: :waiting_time +      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]  | 
