X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FRestrictByUserTest%2FSchema%2FUsers.pm;fp=t%2Flib%2FRestrictByUserTest%2FSchema%2FUsers.pm;h=c8b0d2a0553ac8bec43440d70a07fb2b9db9c0cd;hb=d87edac900b7430e435d828aa8deab5a2dd8495e;hp=73b8178558b43c1f8a29cfc5037af866fe4f2c1e;hpb=772c89c170f979890e5f8d7e7522d50e8dc0323e;p=dbsrgits%2FDBIx-Class-Schema-RestrictWithObject.git diff --git a/t/lib/RestrictByUserTest/Schema/Users.pm b/t/lib/RestrictByUserTest/Schema/Users.pm index 73b8178..c8b0d2a 100644 --- a/t/lib/RestrictByUserTest/Schema/Users.pm +++ b/t/lib/RestrictByUserTest/Schema/Users.pm @@ -1,4 +1,4 @@ -package # hide from PAUSE +package # hide from PAUSE RestrictByUserTest::Schema::Users; use base 'DBIx::Class'; @@ -8,7 +8,7 @@ __PACKAGE__->table('test_users'); __PACKAGE__->add_columns( 'id' => { data_type => 'int', - is_nullable => 0, + is_nullable => 0, is_auto_increment => 1, }, 'name' => { @@ -23,14 +23,14 @@ __PACKAGE__->has_many("notes", "Notes", { "foreign.user_id" => "self.id" }); sub restrict_Notes_resultset { my $self = shift; #the User object my $unrestricted_rs = shift; - + return $self->related_resultset('notes'); } sub restrict_MY_Notes_resultset { my $self = shift; #the User object my $unrestricted_rs = shift; - + return $unrestricted_rs->search_rs( { user_id => $self->id } ); }