In my application, I have an array named @apps which is loaded by ActiveRecord with a record containing the app's name, environment, etc.
I am currently using @apps.count to get the number of apps in the array, but I am having trouble counting the number of applications in the array where the environment = 0.
I tried @apps.count(0) but that didn't work since there are multiple fields for each record.
I also tried something like @apps.count{ |environment| environment = 0} but nothing happened.
Any suggestions?