Answers for "optional null: false in tables for rails"

0

rails g migration foreign key optionnal

#MODEL
belongs_to :author, optional: true

#MIGRATION
t.references :author, foreign_key: true
Posted by: Guest on February-04-2021

Code answers related to "optional null: false in tables for rails"

Browse Popular Code Answers by Language