Did you ever need to store some information in the database being of a specific type? Of course, I guess. We all use strings, integers, decimals, …, and, especially in the case when using PostgreSQL also arrays (pg array). But what if we need a type that does not yet exist? Something that is more unique to the app we’re building. Well, Rails got us covered there:

Custom Types

So, let’s have a look at how custom types work!

Intended Results

First, let’s quickly define what we want to achieve. …


When you’re getting more and more into Rails or any other framework, there is a time when you think that the default is not what you need. This happened to me in that case in Ruby on Rails.

Let me raise my case:

The app I was working on had two production apps running on Heroku. Both apps automatically deploy from the same Github repo after CI was passed. Unfortunately, on one of the apps, there had to be one very small difference within one model. …

Kevin Liebholz

Creator, strategist, and full stack developer. Passionate about using tech to create a sustainable future.

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