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>
This commit is contained in:
Roberto Miranda 2019-04-10 13:44:05 +01:00 committed by Ryuta Kamizono
parent 5f261d04d6
commit 63ca58ae7b
1 changed files with 1 additions and 0 deletions

View File

@ -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)