Check out example codes for "rails join table macro". It will help you in understanding the concepts better.

Code Example 1

create_join_table :posts, :tags

Learn ReactJs, React Native from akashmittal.com