gregbell/active_admin — Issue #1091: show title could default to display_name if it exists
Author: amiel
Created: 2012-02-29 20:06:22+00:00
State: open

This is essentially digging up https://github.com/gregbell/active_admin/pull/495

I originally proposed defaulting the show page title to use #to_s on the resource, but the default #to_s provides something like:
`#` so it was a bit hacky to check for the existence of an overridden #to_s.

Now I'm proposing using resource#display_name as the default title if it is defined.
I know that it's possible to do this:

```ruby
show title: :display_name do
# ...
```

But one of my favorite things about active admin is how easily everything works well out of the box as well as how customizable it is.

I think that this approach with #display_name is appropriate considering the functionality of the breadcrumbs:

https://github.com/gregbell/active_admin/blob/master/lib/active_admin/view_helpers/breadcrumb_helper.rb#L17