Use internal_detect_by_id instead of manually accessing params[:id].