Ruby Infinity: How It Works & Why It Matters

What is infinity in Ruby? It’s something that has a starting point but no ending. In Ruby, we can express this concept of infinity with the Float::INFINITY constant. You may be wondering how this is useful. Let me explain with examples! Infinity As A Result Of Arithmetic Operations Ruby returns an Infinity object, as the … Read more

How to Use The Rails Where Method (With Examples)

In Rails, you can query the database through your models to access your data. You can do this using ActiveRecord methods. Like where, find, or find_by. As a result you get: With find_by, a single record or nil With where, an ActiveRecord::Relation object With find, a single record, found by its primary column (usually id), … Read more