A very common Active Record association when developing a Rails app is the many-to-many, i.e. when an instance of a model can be associated to many instances of another model and vice versa. For this article I will use as example a project I did during The Odin Project course about an app where users can create events and invite other users. In its most simple form, an Event model can have many User instances and each of these User instances can have many Event instances. We have therefore a many-to-many association. In these kind of associations, it is required…


One of the first issues I encountered when deploying my Rails apps to production is that I could no longer store images locally as I was doing in the development environment. For example, if you are using Heroku to deploy your app with Active Storage’s default local storage setup, the images you upload will be stored only temporarily in Heroku’s filesystem.

Luckily, Active Storage supports uploading files to a cloud storage service like Amazon S3, Google Cloud Storage, Microsoft Azure Storage or, like in this case, Cloudinary. Services like Amazon S3 are widely used but they have the inconvenient that…

Victor G. Mestre

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store