Module: ParamsSanitizer::Sanitizers::RejectValue::SanitizerMethods
- Defined in:
- lib/params_sanitizer/sanitizers/reject_value.rb
Instance Method Summary collapse
-
#reject_value(key, default_value, reject_values) ⇒ Object
Define rule of reject value.
Instance Method Details
#reject_value(key, default_value, reject_values) ⇒ Object
Define rule of reject value.
45 46 47 48 49 |
# File 'lib/params_sanitizer/sanitizers/reject_value.rb', line 45 def reject_value(key, default_value, reject_values) check_duplicated_definition!(key) definitions[:reject_value] ||= Hash.new definitions[:reject_value][key.to_s] = { default_value: default_value, reject_values: reject_values } end |