diff options
| -rw-r--r-- | app/models/generic_attribute_control/min_max.rb | 4 | ||||
| -rw-r--r-- | app/models/vehicle_journey_control/delta.rb | 2 | ||||
| -rw-r--r-- | db/schema.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/generic_attribute_control/min_max.rb b/app/models/generic_attribute_control/min_max.rb index 1c429b9a4..18873b683 100644 --- a/app/models/generic_attribute_control/min_max.rb +++ b/app/models/generic_attribute_control/min_max.rb @@ -2,8 +2,8 @@ module GenericAttributeControl class MinMax < ComplianceControl store_accessor :control_attributes, :minimum, :maximum, :target - validates :minimum, numericality: true, allow_nil: true - validates :maximum, numericality: true, allow_nil: true + validates_numericality_of :minimum, allow_nil: true, greater_than_or_equal_to: 0 + validates_numericality_of :maximum, allow_nil: true, greater_than_or_equal_to: 0 validates :target, presence: true include MinMaxValuesValidation diff --git a/app/models/vehicle_journey_control/delta.rb b/app/models/vehicle_journey_control/delta.rb index 077dd6c4a..f061b9fdd 100644 --- a/app/models/vehicle_journey_control/delta.rb +++ b/app/models/vehicle_journey_control/delta.rb @@ -3,7 +3,7 @@ module VehicleJourneyControl 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-3" end end diff --git a/db/schema.rb b/db/schema.rb index 943af87c1..e6fdd9d74 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -403,9 +403,9 @@ ActiveRecord::Schema.define(version: 20171227113809) do t.string "type" t.integer "parent_id", limit: 8 t.string "parent_type" + t.datetime "notified_parent_at" t.integer "current_step", default: 0 t.integer "total_steps", default: 0 - t.datetime "notified_parent_at" t.string "creator" end |
