mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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:
parent
5f261d04d6
commit
63ca58ae7b
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue