aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/generic_attribute_control
diff options
context:
space:
mode:
authorRobert2017-10-13 18:17:00 +0200
committerRobert2017-10-16 07:50:34 +0200
commit9dd7b4d050b64b6fcaebb2cd3f635593a0cb34c3 (patch)
treed20fb589df06d01e46fa8ef4c5313c8cdc7aff94 /app/models/generic_attribute_control
parentc266ee913353d67a3674ed6188c2ff96b44407c1 (diff)
downloadchouette-core-9dd7b4d050b64b6fcaebb2cd3f635593a0cb34c3.tar.bz2
Refs: #4720@1.3h;
Validation implemented for min_max_values with correct I18n'd error messages Applied to: VehicleJourneyControl::Speed & GenericAttributeControl::MinMax
Diffstat (limited to 'app/models/generic_attribute_control')
-rw-r--r--app/models/generic_attribute_control/min_max.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/generic_attribute_control/min_max.rb b/app/models/generic_attribute_control/min_max.rb
index c46ba0453..1f75c2edb 100644
--- a/app/models/generic_attribute_control/min_max.rb
+++ b/app/models/generic_attribute_control/min_max.rb
@@ -5,10 +5,7 @@ module GenericAttributeControl
validates :minimum, numericality: true, allow_nil: true
validates :maximum, numericality: true, allow_nil: true
#validates :target, presence: true
- validate :min_max_values
- def min_max_values
- true
- end
+ include MinMaxValuesValidation
class << self
def attribute_type; :integer end