diff options
| author | cedricnjanga | 2017-12-27 18:00:26 +0100 |
|---|---|---|
| committer | cedricnjanga | 2017-12-29 11:09:59 +0100 |
| commit | 89716d911267da006ad4662be210fa50f9d65373 (patch) | |
| tree | b9c91e5da011e1614573db1af02e931d17b92739 | |
| parent | 99fd5d5cd8885cff6cb3a182212e6b5c1b5f1363 (diff) | |
| download | chouette-core-89716d911267da006ad4662be210fa50f9d65373.tar.bz2 | |
Refs #4786 Update VehicleJourneyControl::WaintingTime validation for maximum (minimum => 0)
| -rw-r--r-- | app/models/vehicle_journey_control/waiting_time.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/vehicle_journey_control/waiting_time.rb b/app/models/vehicle_journey_control/waiting_time.rb index 252135f04..f2666cb72 100644 --- a/app/models/vehicle_journey_control/waiting_time.rb +++ b/app/models/vehicle_journey_control/waiting_time.rb @@ -2,7 +2,7 @@ module VehicleJourneyControl class WaitingTime < ComplianceControl store_accessor :control_attributes, :maximum - validates :maximum, numericality: true, allow_nil: true + validates_numericality_of :maximum, allow_nil: true, greater_than_or_equal_to: 0 def self.default_code; "3-VehicleJourney-1" end end |
