Configure Active Storage for file uploads with variants, direct uploads, and secure attachment handling
with_attached_* scopes to prevent N+1 queries.rails_storage_proxy_pathpurge_later instead of purge to avoid blocking requests with cloud storage API calls.# Install Active Storage (creates migrations for active_storage_blobs/attachments/variant_records)
bin/rails active_storage:install
bin/rails db:migrate
# Add image processing for variants
bundle add image_processing
# config/storage.yml