What is ActiveStorage in Rails?

Answer

ActiveStorage handles file uploads and attachments in Rails. Attach files to models: has_one_attached :avatar or has_many_attached :photos. Files can be stored locally, on Amazon S3, Google Cloud Storage, or Azure. Generate transformations: user.avatar.variant(resize_to_limit: [100, 100]) (uses ImageMagick/libvips). In views: <%= image_tag user.avatar %>. Run migrations: rails active_storage:install. ActiveStorage handles direct uploads, streaming, and multipart uploads. It replaced the popular CarrierWave and Paperclip gems as the built-in solution.