Upgrading to Rails 5.1x

Rails 5.1rolled out with some major changes and features including Yarn and webpack support Dropped JQuery as a default dependency Built-in support for writing system tests using Capybara Encrypted secrets and many more, you can find the detailed release notes here. Recently we upgraded one of our production apps to 5.1x and since we have good test…

Rails Generators

Rails generators are used to create many files for models, controllers, views, unit tests, migrations and more. It will do some of the manual work for us. So it saves time. They can also be used to set up some basic specs for the application test suite. Running rails generate(or rails g) by itself gives…

Database transaction in Rails

A transaction is a sequence of operations performed as a single logical unit of work. A logical unit of work must exhibit four properties called the atomicity, consistency, isolation and durability (ACID) properties, to qualify as a transaction. We use database transactions to make sure that all the instructions we send to database are successful, and…