array_of_objects.select { |favor| favor.completed == false }
Will return all the objects that’s completed is false.
You can also use find_all instead of select.
array_of_objects.select { |favor| favor.completed == false }
Will return all the objects that’s completed is false.
You can also use find_all instead of select.