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
Written by Sakchai Siripanyawuth
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#