What problem does it solve?
This Skill solves the friction of configuring Rails Active Storage so file uploads, image variants, and (optionally) direct uploads work reliably across development and production.
Core Features & Use Cases
- Active Storage installation and service configuration: Set up local and cloud storage (e.g., Disk, S3, GCS) with environment-specific settings.
- Attachment patterns for real models: Configure
has_one_attached and has_many_attached with practical examples for user avatars, event photos, and document uploads.
- Image processing and variants: Define variant pipelines (resize to limit/fill/cover, format changes) and render variant previews in views.
- Production-ready upload workflow: Cover controller parameter permitting, removal/purge behavior (including Turbo Stream), and basic TDD/testing for attachment behavior.
- Validations for safer uploads: Add content-type and size constraints (via gem or manual validation) to prevent unwanted file types.
Quick Start
Tell your AI assistant to configure Active Storage so an application can accept avatar uploads with thumbnail variants and direct upload support.