Dig method in Ruby

#dig method was added in Ruby 2.3 to Array and Hash classes. It makes digging the Array and Hash easy while making the code readable.

~1 min read

Zero-Downtime migrations in Rails

Often, we rename a column and deploy to find out the Honeybadger screaming at us with the errors accessing column with the old name!

1 min read

Hash With Indifferent Access in Rails

When I found out how the params could be accessed using both symbol and string as keys, I dived deep to figure out about ActiveSupport::HashWithIndifferentAccess class in Rails.

1 min read

OpenStruct in Ruby

In Ruby, OpenStruct is a data structure, similar to Hash. With this, we can define attributes with values (key value pairs).

2 min read