Code Explainers

Code explainers tagged #active-storage

ruby
class DocumentsController < ApplicationController
  before_action :authenticate_user!
  before_action :set_document
 

Serving secure file downloads in Rails

authorization signed-urls active-storage
Intermediate 8 steps
ruby
class PurgeStaleExportsJob < ApplicationJob
  queue_as :maintenance
 
  retry_on ActiveRecord::Deadlocked, wait: :polynomially_longer, attempts: 5

Purging stale exports with an Active Job in Rails

background-jobs batching error-handling
Intermediate 7 steps