Changed where logic for dirty dishes to be compatible with older versions of rails