Basically, if `part` is an `id`-like parameter, and the previous part exists (if so, it is the route key), then we have a chain we can use to figure out what the resource is.

I could just as easily not do the assignment in the conditional, changing it to

```ruby
if part =~ /\A(\d+|[a-f0-9]{24})\z/ && parts[index-1]
  route_key = parts[index-1]
  # ...
```

or 

```ruby
config   = parent_config if parent_config && parent_config.resource_name.route_key == parts[index-1]
```