How can you iterate through an array of objects and return the entire object if a certain attribute is correct?
I have the following in my rails app
arr
For first case,
array_of_objects.reject(&:completed)
For second case,
array_of_objects.select(&:completed)