Class: DatabaseConsistency::Checkers::BelongsToPresenceChecker

Inherits:
ValidatorChecker show all
Defined in:
lib/database_consistency/checkers/belongs_to_presence_checker.rb

Overview

This class checks if required belongs_to has foreign key constraint

Constant Summary collapse

MISSING_FOREIGN_KEY =
'model should have proper foreign key in the database'

Instance Attribute Summary

Attributes inherited from ValidatorChecker

#attribute, #model, #validator

Method Summary

Methods inherited from ValidatorChecker

#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::ValidatorChecker