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(to, from) ⇒ Object
Instance Method Details
#client_side_hash(model, attribute, force = nil) ⇒ Object
6 7 8 |
# File 'lib/client_side_validations/active_model.rb', line 6 def client_side_hash(model, attribute, force = nil) build_client_side_hash(model, attribute, self..dup) end |
#copy_conditional_attributes(to, from) ⇒ Object
10 11 12 |
# File 'lib/client_side_validations/active_model.rb', line 10 def copy_conditional_attributes(to, from) [:if, :unless].each { |key| to[key] = from[key] if from[key].present? } end |