Micronaut

The Best way to version flyway scripts

Flyway solves one of the critical problem that we face while deploying our applications to production that is how to deploy DB changes to production DB. If you have worked with ROR then you must know ActiveRecord do provide this feature as migration files. Flyway provide similar solutions as standalone, or as gradle plugin. As…

ruby

Functions in Ruby that make life easy.

I have been using ROR for the last eight months and started loving this language because of the poetic way it allows me to write the code. In this journey, I have found some functions which helped me to keep the code short and improved readability significantly. 1. blank? and present? A common use case…

ruby

Writing my first monkey patch in rails

The motivation From last few months we are facing an error which have become hard to replicate in development environment. The error is This error occurs rarely and replicating have become hard. The idea was to log the query and see why the query is forming correctly. Then I used, query.to_sql to log the query…

ruby

Adding Caching Helper in Rails

When a particular API processing slow or performing a heavy calculation or have heavy DB queries. One of the solution to optimize the API that comes to our mind is to cache the response for appropriate amount of time. This will help us to improve the performance by overcoming the mentioned issues. It is also…