Module: ClientSideValidations::ActiveModel::Validator
- Defined in:
- lib/client_side_validations/active_model.rb
Instance Method Summary collapse
- #client_side_hash(model, attribute, _force = nil) ⇒ Object
- #copy_conditional_attributes(attribute_to, attribute_from) ⇒ Object
Instance Method Details
#client_side_hash(model, attribute, _force = nil) ⇒ Object
10 11 12 |
# File 'lib/client_side_validations/active_model.rb', line 10 def client_side_hash(model, attribute, _force = nil) build_client_side_hash(model, attribute, .dup) end |
#copy_conditional_attributes(attribute_to, attribute_from) ⇒ Object
14 15 16 |
# File 'lib/client_side_validations/active_model.rb', line 14 def copy_conditional_attributes(attribute_to, attribute_from) %i[if unless].each { |key| attribute_to[key] = attribute_from[key] if attribute_from[key].present? } end |