This is not the same thing. By default, Rails does not use foreign keys in the database. Instead, links when created from the command line also create a regular index, for example:
add_index :products, :category_id
Update:
Rails 5 is actually doing the same now. So, to answer the original question: both are currently the same.
source share