gregbell/active_admin — pull request #3092 by dmitry (2014-04-19 18:17:48+00:00)
Title: `find_resource` should look by controller finder when it's set

`find_resource` method used in breadcrumb, and because id passed to the find_resource is the `to_param` identificator and when in controller set the defaults finder it should find the record with this method.

For example, we have model like this:

```ruby
class Post
def to_param
slug
end
end
```

And it registered in the ActiveAdmin with following finder:

```ruby
ActiveAdmin.register Post do

controller do
defaults finder: :find_by_slug!
end
end
```

Current implementation will fail in some cases, because when somebody will go from the index to edit the post, the breadcrumb will try to get the record from the url path matching: `/admin/posts/my-super-post/edit`, it will take `my-super-post` and will fail to find it with `where(id: 'my-super-post')`. This pull-request are fixing it.