Customizing fields with the administrate gem for rails
<p>I cannot seem to find any documentation on how to modify the <a href="https://github.com/thoughtbot/administrate" rel="nofollow">administrate gem</a>'s default dashboards in order to customize what gets displayed in the index and show pages. Here's my specific goal:</p>

<ul>
<li>Given that an <code>Article</code> <code>belongs_to</code> an <code>Author</code></li>
<li>When I create an Article</li>
<li>I want to see the Author's last name in the dropdown list for the associated field</li>
<li>And once saved, I want to see the Author's last name in the Article's index and show pages</li>
</ul>

<p>Right now, instead, I get a not-so-useful "Author #4" as the record label. Here's the automatically generated dashboard:</p>

<pre><code>class ArticleDashboard &lt; Administrate::BaseDashboard
  ATTRIBUTE_TYPES = {
    author: Field::BelongsTo,
    id: Field::Number,
    title: Field::String,
    content: Field::Text,
    created_at: Field::DateTime,
    updated_at: Field::DateTime,
  }.freeze
  [snip]
end
</code></pre>

<p>The "<a href="http://administrate-prototype.herokuapp.com/customizing_dashboards" rel="nofollow">Customizing Dashboard</a>" documentation page says:</p>

<blockquote>
  <p>Each of the Field types take a different set of options, which are specified through the <code>.with_options</code> class method.</p>
</blockquote>

<p>So I figure that calling <code>with_options</code> on <code>Field::BelongsTo</code> might be the way to go, but what options are available for that field (or for any other, for that matter)?</p>