Tutorials
Organized Rails application with interactors and utilities
If you have ever used Rails, you know that there is no better thing for quick prototyping. It doesn’t matter how easy is your favorite framework for that. Rails will be dozens of times easier, especially giving the fact it is now a mature solution...
Managing Rails schema and data migrations without losing your mind
As time goes by, you’ll need to change the data model for your software. Rails makes this extremely easy to do, but leaves much of the day-to-day process to you to sort out (the principle of Sharp Knifes).Once you’re past the initial scaffolding s...
Duplicating models with complex nested associations
I was recently working on an app that required duplicating an Active Record model and its associations. But the complex structure of these.This is the model I needed to duplicate (a simplified version of it). I started off by installing the popul...
Ruby on Rails Rollbar logger installation and configuration
Rollbar is a realtime application monitoring and error tracking software which one can visit anytime via a web browser.Applications can communicate with Rollbar via the HTTP protocol, sending data about their crashes and exceptions.Developers subs...
Inheritance and Abstract Class Pattern for Rails Controllers
Inheritance is often frowned upon, because “You wanted a banana but got the whole jungle…“. In some scenarios, it can be a viable alternative to modules composition for sharing behavior. In this tutorial, I will describe a practical use case where...
How to migrate large database tables without a headache
My client used to say that the reward you get for achieving success is having to deal with even more complexity afterwards.That couldn’t be more true even if only applied to the ever-accumulating database tables when your venture gets traction. On...
Ruby 2.7 reverts the deprecation of flip-flop operator
Flip-flop operator is a range operator. It is used between two conditions inside a loop. It evaluates to true when first condition is true and continues with same truth value until the second condition evaluates to true. It then starts returning f...