D:D has fixed the method invocation issue now
[catagits/CatalystX-Declare.git] / t / lib / TestApp / Controller / ModelTest.pm
1 use CatalystX::Declare;
2
3 controller TestApp::Controller::ModelTest {
4
5     method find_model (Object $ctx) {
6         return $ctx->model('TestModel');
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 }