def call_reject_if(attributes, options)
      return false if destroy_flag?(attributes)

      attributes = attributes.with_indifferent_access
      blank_proc = proc { |attrs| attrs.all? { |_key, value| value.blank? } }
      options[:reject_if] = blank_proc if options[:reject_if] == :all_blank
      case callback = options[:reject_if]
      when Symbol
        method(callback).arity.zero? ? send(callback) : send(callback, attributes)
      when Proc
        callback.call(attributes)
      else
        false
      end
    end
def call_reject_if(attributes, options)
      return false if destroy_flag?(attributes)

      attributes = attributes.with_indifferent_access
      blank_proc = proc { |attrs| attrs.all? { |_key, value| value.blank? } }
      options[:reject_if] = blank_proc if options[:reject_if] == :all_blank
      case callback = options[:reject_if]
      when Symbol
        method(callback).arity.zero? ? send(callback) : send(callback, attributes)
      when Proc
        callback.call(attributes)
      else
        false
      end
    end
Determines if a record with the particular +attributes+ should be rejected by calling the
 reject_if Symbol or Proc (if provided in options).

 Returns false if there is a +destroy_flag+ on the attributes.