All Stories

Testing JSON Jbuilder Responses in Rails Controllers

Introduction: When building Rails applications, it’s essential to test the responses of our controllers, especially when generating JSON output using Jbuilder templates. In this article, we’ll explore how to effectively...

Migrating from an Unencrypted Redis Cluster to an Encrypted Redis Cluster

AWS provides two types of encryption for Redis clusters: at-rest encryption and in-transit encryption. Let’s explore what each of these means and how to migrate your Redis cluster to enable...

ActiveRecord Import: Using `new` vs Hash in Bulk Record Creation

Introduction: When creating a large number of records in Rails using ActiveRecord’s create! method, calling a database query for each record can be inefficient. However, there are alternative approaches that...

Spotify API

Introduction: Spotify is a popular music streaming platform that offers a wide range of features for its users. One interesting aspect is the ability to retrieve information about the currently...

Rails 7 excluding on ActiveRecord::Relation

Rails 7 introduced a new method excluding for ActiveRecord::Relation, offering a convenient way to exclude specific records from a collection. This addition provides developers with a cleaner and more expressive...