aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorXinhui2017-09-27 11:59:44 +0200
committerXinhui2017-09-27 15:39:16 +0200
commitc3f80c537e28dfe316ee0dcbee2bde2b5307fd79 (patch)
tree8dc067d2b7cd378d03be8f9d19f46fff542ec8d6 /app/models
parentb64a51db2cff7aed22ef9eabb8210905cbe9d626 (diff)
downloadchouette-core-c3f80c537e28dfe316ee0dcbee2bde2b5307fd79.tar.bz2
Support of dynamic_attributes in form
Refs #4467
Diffstat (limited to 'app/models')
-rw-r--r--app/models/generic_attribute_min_max.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/models/generic_attribute_min_max.rb b/app/models/generic_attribute_min_max.rb
index 8e85834a8..91bf285f0 100644
--- a/app/models/generic_attribute_min_max.rb
+++ b/app/models/generic_attribute_min_max.rb
@@ -1,23 +1,23 @@
class GenericAttributeMinMax < ComplianceControl
-
-
hstore_accessor :control_attributes, minimum: :integer, maximum: :integer
- #attribute :minimum, type: :integer, optionnal: true
- #attribute :maximum, type: :integer, optionnal: true
- #attribute :target, type: ModelAttribute
@@default_criticity = :warning
@@default_code = "3-Generic-2"
validate :min_max_values
+
def min_max_values
true
end
- after_initialize do
- self.name = 'GenericAttributeMinMax'
- self.code = @@default_code
- self.criticity = @@default_criticity
+ def self.dynamic_attributes
+ self.hstore_metadata_for_control_attributes.keys
end
+ # after_initialize do
+ # self.name = 'GenericAttributeMinMax'
+ # self.code = @@default_code
+ # self.criticity = @@default_criticity
+ # end
+
end