Lucian Ghinda
Random Thoughts about Building Software

Random Thoughts about Building Software

Series

Ruby/Rails Tips and TILs

Short Ruby or Ruby on Rails tips or Today I Learned moments

Articles in this series

Ruby: Using .all? when the variable can be an empty array

Dec 10, 20211 min read

Context You have an array of hashes and want to check if all elements are satisfying a condition. TIL You might want to do this in Ruby: objects.all?...

Ruby: Using .all? when the variable can be an empty array
How to compare two arrays of hashes by value in Ruby
How to update multiple different values at the same time in one query