From 41b2ba5926ab01be517c8e8c51cc168b1cb00837 Mon Sep 17 00:00:00 2001 From: Simon Stemplinger Date: Wed, 8 Apr 2015 22:02:00 +0200 Subject: [PATCH] fix documentation for SchemaStatements#add_foreign_key The implementation of the generation of the foreign key name was changed between Rails 4.2.0 and 4.2.1 from a random to a deterministic behavior, however the documentation still describes the old randomized behavior. --- .../connection_adapters/abstract/schema_statements.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index ab1b098e53..f0909aabb5 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -690,8 +690,8 @@ module ActiveRecord # +to_table+ contains the referenced primary key. # # The foreign key will be named after the following pattern: fk_rails_. - # +identifier+ is a 10 character long random string. A custom name can be specified with - # the :name option. + # +identifier+ is a 10 character long string which is deterministically generated from the + # +from_table+ and +column+. A custom name can be specified with the :name option. # # ====== Creating a simple foreign key #