Keshav Biswa

Keshav Biswa

Keshav is a Senior Software Developer with expertise in Ruby on Rails. He is committed to building robust, high-quality systems while leading a project delivery.
• authorImg Keshav Biswa

Sort Rails Models By Association Order

Sort your Rails models by the order of their belongs_to associations using ActiveRecord::Reflection.
• authorImg Keshav Biswa

Customizing Rails Generators with Thor

Templates are an easy way to customize your Rails generators to fix repetitive tasks and make your life easier.
• authorImg Keshav Biswa

Rails 7.1 Introduces Default Health Check

Rails 7.1 now introduces a default health check endpoint for health checks.
• authorImg Keshav Biswa

Rails Inflections Initializer Guide

Rails comes with a lot of initializers. In this post, we will look at the inflections.rb initializer and how we can use it.
• authorImg Keshav Biswa

Rails 7.1 db:prepare Loads Schema

Rails 7.1 introduces a new feature to allow db:prepare to load schema if the database already exists but is empty.
• authorImg Keshav Biswa

Rails Opt Out of SameSite Cookie

Rails 7.1 introduces a new feature to allow opting out of the SameSite cookie attribute when setting a cookie.
• authorImg Keshav Biswa

Rails Parameters.to_h Accepts Block

ActionController::Parameters.to_h will now receive a block just like Hash#to_h and achieve parity.
• authorImg Keshav Biswa

Guide to Gemfile and Gemfile.lock

An in-depth overview of what a Gemfile is, how it works, and its role in managing Ruby dependencies
• authorImg Keshav Biswa

Rails adds --js alias to --javascript

Rails now provides support to choose a javascript approach using --js alias
• authorImg Keshav Biswa

Rails Pattern Matching for ActiveModel

Rails now provides pattern matching support for ActiveModel (and transitively ActiveRecord)
• authorImg Keshav Biswa

Rails 7 Adds structurally_compatible?

Rails 7 adds structurally_compatible? to check if two relations can be combined with or/and queries.
• authorImg Keshav Biswa

Rails 7 Optimizes remove_columns

Rails 7 optimizes remove_columns to generate a single SQL statement for dropping multiple columns on MySQL and PostgreSQL.
• authorImg Keshav Biswa

Rails 7 Nested Locales in Engines

Rails 7 allows loading nested locales inside the `/locales` directory by default for better organization in larger apps.
• authorImg Keshav Biswa

Rails 7 Generators Validate Attributes

Rails 7 generators will validate the type by checking if it is of a default migration type and will raise an error if it is invalid.
• authorImg Keshav Biswa

Ruby 3.1 Adds Enumerable#compact

Ruby 3.1 adds Enumerable#compact and Enumerator::Lazy#compact to return a copy of `self` with all `nil` elements removed.
• authorImg Keshav Biswa

Rails 7 Adds Enumerable max/min Methods

Rails 7 adds `Enumerable#maximum` and `Enumerable#minimum` to calculate the maximum or minimum from extracted elements of an enumerable.