Skudo/infopark-crm-helpers

View on GitHub
lib/crm/helpers/validators/crm_integer_validator.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Crm
  module Helpers
    module Validators
      class CrmIntegerValidator < CrmEachValidator
        def validate_each(record, attribute, _)
          record.validates_numericality_of attribute, only_integer: true
        end
      end
    end
  end
end