Active Storage services default to private access, unless you specifically make them public.
By default, Active Storage assumes private access to services. This means generating signed, single-use URLs for blobs. If you’d rather make blobs publicly accessible, specify public: true in your app’s
But sometimes apps need both private and public services. For example, User avatars and Account logos could be accessed directly, but Account reports need an authorization check with a redirect to a signed, single-use URL.
You can pass the
service option to
has_many_attached, but what if you want to use local storage for running tests? Here’s a way to do that.