Image for post
Image for post
A joining table

Active Record in Rails has simplified database table relations. It made it much easier for the backend developers to connect tables together whether it is many-to-many or one to one.

In this blog, I will show you a simple way how to create a many-to-many relationship in your backend rails project. Open your project and follow with me step by step to tackle this complicated challenge in other programming languages and frameworks.

Pick your models

Decide which models that have a many-to-many relationship. For example, the relationship between authors and books.

Shaqqour

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store