Skip to content

Commit 63ca58a

Browse files
robertomirandakamipo
authored andcommitted
Adding type option example to the documentation [ci skip] (rails#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 <[email protected]>
1 parent 5f261d0 commit 63ca58a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ def timestamps(**options)
416416
#
417417
# t.references(:user)
418418
# t.belongs_to(:supplier, foreign_key: true)
419+
# t.belongs_to(:supplier, foreign_key: true, type: :integer)
419420
#
420421
# See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use.
421422
def references(*args, **options)

0 commit comments

Comments
 (0)