Ruby Ruby do not use keys method on a hash in loop Today, I was looking at the internal working of a gem. While working on the same, I came across the code where the network calls were being made and it had to check
Ruby Asynchronous Programming in Ruby In traditional programming practice, I/O operations happen synchronously. The main thread will be blocked until I/O operation gets completed and CPU remains idle for the time I/O operation is getting completed. Consider the
Ruby Memoization in Ruby This tutorial will help you understanding Memoization pattern in Ruby. Memoization is different from Lazy Initialization. Rails had Memoize to support memoization pattern which will be discussed as well.
Ruby Integrate awesome_print with Rails Console awesome_print is code beautifying library available for beautifying Rails & Ruby code. This can be integrated with interactive Ruby and Rails console if you follow the instructions given below.
Ruby Check if key exists in hash In Ruby on Rails Programming you might have to check if key exists in hash and based on that you might have to perform other operation. There is a simple way to detect
Rails rake db migrate with down, up, redo, rollback options rake db migrate - This can be used to migrate your production/test database using various options like up, down, step, redo, version etc. In this tutorial we will learn how all these options