alter the approach because a private method was removed from rails and there is still no good way to hook in at the right time