I was working recently on a Rails project and I faced an interesting behavior of delete_all from ActiveRecord. In this post, I’ll go through the steps that I have done to understand what happened and how I did manage to get around it.
Background jobs are used a lot in production. At first, the concept may seem complex or unclear why we are using it. So without a lengthy introduction let’s jump into action with a simple example.
I saw a lot of projects where the default date format was used. In fact, customizing the date format to provide a human-readable date will be very welcomed from your customers!
Choosing a good name for a class or a variable isn’t easy at all and sometimes there is a requirement to rename existing tables and models to match the updated product audience.
We saw previously in this post how to add uniqueness database constraint for a single table. But in real-world applications, we have different associations between models, so let’s start with an example:
Keep going!Keep going ×2!Give me more!Thank you, thank youFar too kind!Never gonna give me up?Never gonna let me down?Turn around and desert me!You're an addict!Son of a clapper!No wayGo back to work!This is getting out of handUnbelievablePREPOSTEROUSI N S A N I T YFEED ME A STRAY CAT