Rails Rails 6 ActiveRecord supports Multi DB connection switching Rails 6 ActiveRecord supports Multiple database connection switching. Moreover, we can use different database connections for reading / writing with use of replicas to improve performance of the application.
Rails Rails usage of after_commit vs after_save Rails provides ActiveRecord callbacks to perform an action after a record is updated in the database. But, when to use after_commit vs after_save really depends on the activities that need to be done
Rails Ruby Detect vs Select method on Enumerable There is a subtle difference between Detect and Select method in Ruby. Select and detect both operate on Enumerable and require a condition to return the result. The primary difference between the two
Rails Rails generate password protected PDF file with Prawn Generating password protected PDF file is required if data being exported is sensitive. In Rails, Prawn gem can be used to generate password protected PDF file.
Rails Rails building json API responses with JBuilder Rails is a MVC web application framework which supports building complex websites without writing any APIs. But, client side libraries are evolving at brisk pace with wide-spread use of React JS, AngularJS, VuJS
Rails Rails adds before? after? methods on date time classes Rails Date, DateTime, Time, TimeWithZone class objects could be compared using less than, greater than signs. Rails added methods before? and after? to compare objects of these datetime classes.