@Get @Path("/codes/{code.id}/edit") public void edit(Code code) { this.result .use(Results.logic()) .forwardTo(CodeController.class) .index(repository.find(code.getId()), false); }
@Get @Path("/codes/{code.id}") public Code show(Code code) { return repository.find(code.getId()); }
@Delete @Path("/codes/{code.id}") public void destroy(Code code) { repository.destroy(repository.find(code.getId())); result.redirectTo(this).index(null, false); }