Rediscovering ActiveRecord
summary
Shows how ActiveRecord turns a class into live objects by loading table schema (via schema_cache.columns_hash), building an ARel AST and statement cache with BindParam placeholders, executing binds to produce a result_set, and instantiating records with generated accessors. Covers the Attributes API and casting via ActiveModel::Type::Value including custom types (deserialize, cast, serialize), and the LazyAttributeHash that delays casting by storing raw values and types until access.
AI-written summary · about
chapters (5)
- 0:00Start
- 2:42Introspection
- 7:02A cast type is a class derived from Active Model:: Type::Value
- 17:58Define all accessors and helper methods for attributes
- 18:35lib/active_record/ attribute_methods.rb file includes all the logic
related talks
19mAn ActiveRecord Rewrite: the Story Behind the Attributes API
41mAn Intervention for ActiveRecord
29mActiveRecord, the Repository Pattern, and You
31mActiveSupport and ActiveModel
01h 52mBuild High Performance Active Record Apps
25mActiveRecord can't do it? Arel can!
30mBuilding an ORM with AReL: Walking up the (AS)Tree.
01h 52mBuild High Performance Active Record Apps
