RailsConf 2022 - Reflecting on Active Record Associations by Daniel Colson - YouTube

Active Record associations seem magical—add a has_many here, a belongs_to there, and suddenly your models are loaded with behavior. Could it be magic, or is it plain old Ruby with some thoughtful design and a bit of metaprogramming? In this talk we'll study Active Record associations by writing our own belongs_to and has_many macros. We'll dynamically define methods, cache query results, replace a a Relation with a CollectionProxy, and automatically prevent N 1 queries with inverses. You'll leave with a deeper understanding of associations, and a new appreciation for their magic.
RailsConf 2022 - Reflecting on Active Record Associations by Daniel Colson - YouTube #ruby #rubydeveloper #rubyonrails #active #record #youtube https://rubyonrails.ba/single/railsconf-2022-reflecting-on-active-record-associations-by-daniel-colson-youtube

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles