refactoring ' <- "
modify view($id); add response 404 Not Found
add json/empty.ctp
modify edit($id); add error not exists id
extract _responseErrorBadRequest()
modfiy _save() use _responseErrorBadRequest()
refactoring _save()
modify to "ID is not exists"
rename _errorBadRequest <- _responseErrorBadRequest()
extract _errorNotFound()
refactoring view($id)
modify edit($id); error status 404 <- 401
add HTTP_NOT_FOUND
extract $message
refactoring inline url
comment
refactoring
extract url
refactoring $link
refactoring inline link, text