Check out example codes for "how to make custom primary key rails". It will help you in understanding the concepts better.

Code Example 1

# In the migration table...
create_table :items, id: false do |t|
    ...
  end

Learn ReactJs, React Native from akashmittal.com