public function isRelevant($action, $resource)
    {
        // Nested resources can be passed through a associative array, this way conditions which are
        // dependent upon the association will work when using a class.
        $resource = is_array($resource) ? head(array_keys($resource)) : $resource;
        return parent::isRelevant($action, $resource);
    }