RailsConf 2022 - Reflecting on Active Record Associations by Daniel Colson

Channel:
Subscribers:
42,400
Published on ● Video Link: https://www.youtube.com/watch?v=ImwNMYjRMSg



Duration: 32:03
56 views
1


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.




Other Videos By Confreaks


2023-01-16RailsConf 2022 - Start Your Ruby Podcast Today! No Experience Required by Jason Charnes
2023-01-16RailsConf 2022 - Do You Trust Me? A look at Trust, Time, and Teams by John DeWyze
2023-01-16RailsConf 2022 - Don't touch that! by Adam Cuppy
2023-01-16RailsConf 2022 - Learn it, Do it, Teach it: How to Unstick Our Middle Devs by Chelsea Kaufman
2023-01-16RailsConf 2022 - How music works, using Ruby by Thijs Cadier
2023-01-16RailsConf 2022 - Finding the Needle in the Stack Trace: APM Logs-in-Context - New Relic -
2023-01-16RailsConf 2022 - Git your PR accepted. Rebase your changes like a pro by Daniel Magliola
2023-01-16RailsConf 2022 - `rails c` with meturbocharge your use of the interactive console by Sweta Sanghavi
2023-01-16RailsConf 2022 - Growing Your Background Job Knowledge - Weedmaps - Jake Anderson
2023-01-16RailsConf 2022 - "Build vs Buy" on Rails by Colin Loretz
2023-01-16RailsConf 2022 - Reflecting on Active Record Associations by Daniel Colson
2023-01-16RailsConf 2022 - More Engineers, More Problems: Solutions for Big Teams - Chime -
2023-01-16RailsConf 2022 - Building a diverse engineering team - Wrapbook - Zaid Zawaideh & Jessica Lawrence
2023-01-16RailsConf 2022 - Opening Keynote: The Journey to Zeitwerk by Xavier Noria
2023-01-16RailsConf 2022 - The Little Engines That Could by Mina Slater
2023-01-16RailsConf 2022 - Ooops! You named it wrong. What now? by Ian Norris & Melissa Hunt Glickman
2023-01-16RailsConf 2022 - A Rails Developer’s Guide To The Ruby VM by Maple Ong
2023-01-16RailsConf 2022 - Ruby Archaeology by Nick Schwaderer
2023-01-16RailsConf 2022 - Keynote: A tech görl origin story by Crystal Tia Martin
2023-01-16RailsConf 2022 - Come on in! Making yourself at home in a new codebase by Mercedes Bernard
2023-01-16RailsConf 2022 - Experimental Patterns in ActiveRecord by John Crepezzi



Tags:
RailsConf
Rails
RubyonRails
DHH