Ruby on Rails 5.2 introduced Active Storage , which can be used to attach files (e.g., avatar images) to objects and store those files on the server or in the cloud.
Not only can Active Storage store files, but it can also convert and resize them. In this chapter, I will show you how to attach a file to give you the basic idea of how Active Storage works.
First, I’m sorry for not coming up with a more original example! Everybody uses avatars to describe how to attach something, but I will do it too because it is such a common use case.
Let’s create a new phone book application ...