Refactored find_by_id_or_slug to work in production