[Catalyst-commits] r8158 - in
Catalyst-Controller-DBIC-API/1.001/trunk: .
t/lib/RestTest/Controller/API/REST
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Wed Jul 23 19:11:28 BST 2008
Author: lukes
Date: 2008-07-23 19:11:28 +0100 (Wed, 23 Jul 2008)
New Revision: 8158
Added:
Catalyst-Controller-DBIC-API/1.001/trunk/t/lib/RestTest/Controller/API/REST/BoundArtist.pm
Modified:
Catalyst-Controller-DBIC-API/1.001/trunk/
Log:
r1715 at ubuntu (orig r8157): jshirley | 2008-07-23 19:08:20 +0100
Adding the missing controller so my tests pass.
Property changes on: Catalyst-Controller-DBIC-API/1.001/trunk
___________________________________________________________________
Name: svk:merge
+ 4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Controller-DBIC-API/1.000/trunk:8157
Added: Catalyst-Controller-DBIC-API/1.001/trunk/t/lib/RestTest/Controller/API/REST/BoundArtist.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.001/trunk/t/lib/RestTest/Controller/API/REST/BoundArtist.pm (rev 0)
+++ Catalyst-Controller-DBIC-API/1.001/trunk/t/lib/RestTest/Controller/API/REST/BoundArtist.pm 2008-07-23 18:11:28 UTC (rev 8158)
@@ -0,0 +1,24 @@
+package RestTest::Controller::API::REST::BoundArtist;
+
+use strict;
+use warnings;
+use base qw/RestTest::Controller::API::REST::Artist/;
+use JSON::Syck;
+
+__PACKAGE__->config
+ ( action => { setup => { PathPart => 'bound_artist', Chained => '/api/rest/rest_base' } },
+ class => 'RestTestDB::Artist',
+ setup_list_method => 'filter_search',
+ create_requires => ['name'],
+ create_allows => ['name'],
+ update_allows => ['name']
+ );
+
+# Arbitrary limit
+sub filter_search : Private {
+ my ( $self, $c, $query ) = @_;
+ # Return the first one, regardless of what comes in via params
+ $query->{search}->{'artistid'} = 1;
+}
+
+1;
More information about the Catalyst-commits
mailing list