aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/generic_attribute_control
diff options
context:
space:
mode:
authorcedricnjanga2018-03-15 06:57:35 -0700
committercedricnjanga2018-03-15 06:57:35 -0700
commitc297e8a97f41221c0a6cfd5f3aee89589811d47c (patch)
tree229625893eae70c42aa13ab632d7919bafc972af /app/models/generic_attribute_control
parent7ccef25a79817223cf5cd8962f7de72279f33649 (diff)
downloadchouette-core-c297e8a97f41221c0a6cfd5f3aee89589811d47c.tar.bz2
Refs #6139 Change Min max values validation concern to allowed float values
Diffstat (limited to 'app/models/generic_attribute_control')
-rw-r--r--app/models/generic_attribute_control/min_max.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/generic_attribute_control/min_max.rb b/app/models/generic_attribute_control/min_max.rb
index 18873b683..bab900f0e 100644
--- a/app/models/generic_attribute_control/min_max.rb
+++ b/app/models/generic_attribute_control/min_max.rb
@@ -1,9 +1,7 @@
module GenericAttributeControl
class MinMax < ComplianceControl
store_accessor :control_attributes, :minimum, :maximum, :target
-
- 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