Fix generate_rs to set model to contents of stash->{class} if present and add tests.
[catagits/Catalyst-Controller-DBIC-API.git] / t / lib / RestTest / Controller / API / REST / StashedClass.pm
1 package RestTest::Controller::API::REST::StashedClass;
2 use Moose;
3 BEGIN { extends 'Catalyst::Controller::DBIC::API::REST' }
4
5 use namespace::autoclean;
6
7 sub setup :Chained('/api/rest/rest_base') :CaptureArgs(1) :PathPart('stashedclass') {
8     my ($self, $c, $class) = @_;
9     $c->stash->{class} = $class;
10     $self->next::method($c);
11 }
12
13 1;