~/talk

How to migrate to Active Storage without losing your mind

Talkat RailsConf 2019 · 2019-05-01..05-03· [ruby-on-rails]
links:none on file
slides:none on file

Concrete plan: install Active Storage and run the migrations, configure Amazon S3 per environment, then run a rake task to copy Paperclip fields into active_storage.blobs and active_storage_attachments that maps avatar_file_name, content_type, byte_size, key and checksum. Expect a two-deploy workflow because the task depends on the old Paperclip accessors and Active Storage needs its tables. Watch for key formatting and checksum work (80k files tested) — about 30% of images came out blurry due to MiniMagick; Rails 6 moves to image_processing and variants are generated lazily and cached. Verify by counting blobs and attachments and spot-checking records.

AI-written summary · about

  1. 0:00Start
  2. 1:53What is Active Storage?
  3. 2:25Why Active Storage?
  4. 3:12Active Storage Documents
  5. 4:36Active Storage is different
  6. 5:08Create Active Storage Tables
  7. 7:29Map attachment data
  8. 8:11Active Storage Attachments Table
  9. 8:37Active Storage BLOBS Table
  10. 9:24Table mapping
  11. 9:48Step 2
  12. 14:45Step 3.
  13. 15:04Run Rake Task
  14. 15:39What we've done
  15. 17:43Update Views, Models, Controllers and Tests
  16. 18:54What are variants?
  17. 20:23Too early to the party?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.