Module: ClientSideValidations::ActiveModel::Validator

Defined in:
lib/client_side_validations/active_model.rb

Instance Method Summary collapse

Instance Method Details

#client_side_hash(model, attribute) ⇒ Object



6
7
8
9
# File 'lib/client_side_validations/active_model.rb', line 6

def client_side_hash(model, attribute)
  extra_options = options.except(*::ActiveModel::Errors::CALLBACKS_OPTIONS - [:on, :allow_blank])
  { :message => model.errors.generate_message(attribute, message_type, extra_options) }.merge(extra_options)
end