module ClientSideValidations::ActiveModel::Format

Public Instance Methods

client_side_hash(model, attribute, force = nil) click to toggle source
Calls superclass method
# File lib/client_side_validations/active_model/format.rb, line 6
def client_side_hash(model, attribute, force = nil)
  options = self.options.dup
  if options[:with].respond_to?(:call)
    return unless force

    options[:with] = options[:with].call(model)
    build_client_side_hash(model, attribute, options)
  elsif options[:without].respond_to?(:call)
    return unless force

    options[:without] = options[:without].call(model)
    build_client_side_hash(model, attribute, options)
  else
    super
  end
end

Private Instance Methods

message_type() click to toggle source
# File lib/client_side_validations/active_model/format.rb, line 25
def message_type
  :invalid
end