Abhi On Rails

Ruby On Rails - What I learned recently

through association

There are many associations in Rails, like one-to-one, one-to-many, many-to-many. You can associate a model to another using any of these associations. So what is 'through' association?

Take an example of three models: teacher, student, subject


There is no direct association between teacher and student. So using through you can create association between teacher and student models.


blog comments powered by Disqus
Pagination →
← Cron Job