Last Updated: February 25, 2016
·
914
· artellectual

Complex Has Many Associations with ActiveRecord

Most people know how to setup relationships between models just fine, they'll be able to setup a one to one / one to many / many to many / polymorphic relationship between model. However most people don't realise that ActiveRecord is much more powerful than that, you can actually build complex relationships that will help you 'design' you application's DSL to be more beautiful, in this post we look at how we use the options for hasmany and belongsto to build complex relationships between models.

http://www.artellectual.com/posts/complex-has-many-associations-with-activerecord