Class: DatabaseConsistency::Checkers::LengthConstraintChecker

Inherits:
ColumnChecker show all
Defined in:
lib/database_consistency/checkers/column_checkers/length_constraint_checker.rb

Overview

This checker checks that column has a length constraint if there is a length validation

Constant Summary collapse

VALIDATOR_CLASS =
if defined?(ActiveRecord::Validations::LengthValidator)
  ActiveRecord::Validations::LengthValidator
else
  ActiveModel::Validations::LengthValidator
end

Instance Attribute Summary

Attributes inherited from ColumnChecker

#column, #model

Method Summary

Methods inherited from ColumnChecker

#column_or_attribute_name, #initialize, #table_or_model_name

Methods inherited from BaseChecker

checker_name, enabled?, #enabled?, #report, #report_if_enabled?

Constructor Details

This class inherits a constructor from DatabaseConsistency::Checkers::ColumnChecker