Use find_each for better performance
The use of model.all.each would cause the console to pull in all records into memory (as an array) which will either appear as a very slow operation or one that fails after a certain limit of memory is reached (killing the console) This change updates a specific troubleshooting snippet that was using model.all.each call The change does not break the snippet's original goals, just makes it use fewer machine resources
Showing
Please register or sign in to comment