bugfix for issue/#1 - break active_record each with redirect when hashes match, set flash[:error] after active_record each was processed and no hash matched