Inside Active Storage: a code review of Rails' new framework
summary
Live code review shows Active Storage’s actual architecture: has_one_attached defines methods via class_eval, attach creates a Blob row in active_storage_blobs then calls a Service to move bytes, DiskService literally calls IO.copy_stream, S3 Service uses aws‑sdk‑s3, JavaScript direct uploads put blobs before final attach, variants use MiniMagick, purge_later enqueues an Active Job that calls the service delete, and migrations run with rails active_storage:install.
AI-written summary · about
chapters (10)
- 0:00Start
- 2:30I work for a storage company
- 2:54I will talk about Active Storage
- 5:09How to use Active Storage
- 10:42The main classes of Active Storage
- 12:40What is ActiveStorage Service
- 13:40Inside Active Storage Service (disk)
- 15:03Inside ActiveStorage Service (S3)
- 17:18What is ActiveStorage::Blob
- 22:20How Active Storage works
related talks
22mHow to migrate to Active Storage without losing your mind
25mCan ActiveStorage Serve Images for the Modern Web?
31mActiveSupport and ActiveModel
33mValidating and Processing the Content of...
19mBuilding a Rails Engine From Scratch: Active Storage Dashboard
29mActiveRecord, the Repository Pattern, and You
17mActiveJob: A Service Oriented Architecture
42mPowerful Rails Features You Might Not Know
