Rails Rails find missing indexes on tables with lol_dba gem Missing indexes on database tables causes performance issues. lol_dba gem helps finding out missing indexes on database table in Rails code. lol_dba performs static analysis of the code to find out missing indexes.
Rails Rails Soft Delete with Paranoia gem Sometimes, we need to delete records logically but not physically. Paranoia gem allows us to soft delete records. Records are marked as deleted by a column in a table. Article helps understand how
Rails Rails ActiveAdmin N+1 query optmization for controller actions ActiveAdmin is one of the most used Admin interface with the Rails applications. It provides an easy way to view, create, update or destroy records. When a model is registered with ActiveAdmin, it
Ruby Rails form_with - alternative to form_for and form_tag Rails 5.1 added form_with form helper method that provides capabilities of form_for and form_tag. Rails unified form_for and form_tag that provide similar interfaces to generate forms with form_with helper.
Ruby Safe navigation operator in Ruby Ruby 2.3 has introduced safe navigation operator. Safe navigation operator returns nil if a method is called on a nil object. Before this, if a method is called on a nil object, it
Rails Use find_each instead of all.each in Rails In Rails, sometimes we need to iterate over all the records from a model. To achieve this people prefer to use all.each on a model. This can lead to usage of memory if