Rails association conventions
2 min readJan 25, 2018
Notes about Rails association conventions.
If we have DB schema as below:
Conventions of “belongs_to” association will be like this:
Conventions of “has_many” association will be like this:
Conventions of “has_many :through” association will be like this:
I made a website for checking associations. Check it below!
English ver: https://kansetsu7.github.io/rails_association_checker/
Chinese ver: https://kansetsu7.github.io/rails_association_checker/index_tw.html