references vs foregign key ruby code example Example: activerecord references foreign key t.references :user, foreign_key: true