aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRoberto Miranda <rjmaltamar@gmail.com>2019-04-10 13:44:05 +0100
committerRyuta Kamizono <kamipo@gmail.com>2019-04-10 21:44:05 +0900
commit63ca58ae7bbafa0983ed8968ea6310ef33956261 (patch)
tree4594ef05c4927141ce7226612d83264b1231c068 /activerecord/lib
parent5f261d04d6f857d49c75124df809adfbd6cd5b5e (diff)
downloadrails-63ca58ae7bbafa0983ed8968ea6310ef33956261.tar.gz
rails-63ca58ae7bbafa0983ed8968ea6310ef33956261.tar.bz2
rails-63ca58ae7bbafa0983ed8968ea6310ef33956261.zip
Adding type option example to the documentation [ci skip] (#35917)
* Adding type option example to the documentation [ci skip] It was hard for me looking https://api.rubyonrails.org/ to find that there was a type option. Adding this to the doc would be helpful especially for application with old tables where the references are still an integer not bigint * Update activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb Co-Authored-By: robertomiranda <rjmaltamar@gmail.com>
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
index 4861872129..688eea75e8 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -416,6 +416,7 @@ module ActiveRecord
#
# t.references(:user)
# t.belongs_to(:supplier, foreign_key: true)
+ # t.belongs_to(:supplier, foreign_key: true, type: :integer)
#
# See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use.
def references(*args, **options)