From 5ad2bce12d91786486c7f476f06a5139e12046ff Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Thu, 11 Sep 2008 14:02:45 +0100 Subject: Add an example --- railties/doc/guides/migrations/foreign_keys.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/doc/guides/migrations/foreign_keys.txt') diff --git a/railties/doc/guides/migrations/foreign_keys.txt b/railties/doc/guides/migrations/foreign_keys.txt index 005f62a462..68c1ad7d9a 100644 --- a/railties/doc/guides/migrations/foreign_keys.txt +++ b/railties/doc/guides/migrations/foreign_keys.txt @@ -1,5 +1,5 @@ -== Active Record and Referential Integrity == [[foreign_key]] +== Active Record and Referential Integrity == The Active Record way is that intelligence belongs in your models, not in the database. As such features such as triggers or foreign key constraints, which push some of that intelligence back into the database are not heavily used. Validations such as `validates_uniqueness_of` are one way in which models can enforce data integrity. The `:dependent` option on associations allows models to automatically destroy child objects when the parent is destroyed. These cannot however guarantee referential integrity and so some people augment them with foreign key constraints. -- cgit v1.2.3