Commit | Line | Data |
---|---|---|
8e5d9092 | 1 | use CatalystX::Declare; |
2 | ||
3 | controller TestApp::Controller::ModelTest { | |
4 | ||
5 | method find_model (Object $ctx) { | |
2b73049f | 6 | return $ctx->model('TestModel'); |
8e5d9092 | 7 | } |
8 | ||
9 | ||
10 | action base as 'model_test' under '/'; | |
11 | ||
12 | under base { | |
13 | ||
14 | final action next { | |
15 | $ctx->response->body( $self->find_model($ctx)->next ); | |
16 | } | |
17 | ||
18 | final action reset { | |
19 | $ctx->response->body( $self->find_model($ctx)->reset ); | |
20 | } | |
21 | } | |
22 | } |