Make admin_required work with new routes
[gruntmaster-page.git] / lib / Gruntmaster / Page / Generic.pm
index 36ca445a98c00c26ee4cae0b3b5190936d56d75d..35d89adab97874619da159b1a8a24ea5023a6b43 100644 (file)
@@ -63,8 +63,7 @@ sub entry {
        my ($thing, $lang, $env, $id) = @_;
        my %thing = %$thing;
        debug $env => "Rsname is $thing{rsname} and id is $id";
-       $thing{makers} //= sub { db(shift)->resultset($thing{rsname}) };
-       my %params = map {+ rs => $_, $_->get_columns } $thing{makers}->($env)->find($id);
+       my %params = map {+ rs => $_, $_->get_columns } db($env)->resultset($thing{rsname})->find($id);
        $thing{mangle}->(local $_ = \%params) if exists $thing{mangle};
        wantarray ? %params : \%params
 }
This page took 0.00975300000000001 seconds and 4 git commands to generate.