Пример #1
0
 @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);
 }
Пример #2
0
 @Get
 @Path("/codes/{code.id}")
 public Code show(Code code) {
   return repository.find(code.getId());
 }
Пример #3
0
 @Delete
 @Path("/codes/{code.id}")
 public void destroy(Code code) {
   repository.destroy(repository.find(code.getId()));
   result.redirectTo(this).index(null, false);
 }