Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add associated objects display methods to docs

  • Loading branch information...
commit 723a015440d6b8a42e05a78caf9526d7358179c9 1 parent c6baabf
@mattvague mattvague authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 docs/3-index-pages/index-as-table.md
View
10 docs/3-index-pages/index-as-table.md
@@ -15,6 +15,13 @@ column method:
column :title
end
+For association columns we make an educated guess on what to display by
+calling the following methods in the following order:
+
+ :display_name, :full_name, :name, :username, :login, :title, :email, :to_s
+
+This can be customized in config/initializers/active_admin.rb.
+
If the default title does not work for you, pass it as the first argument:
index do
@@ -53,7 +60,6 @@ Alternatively, you can create a column with custom links:
end
end
-
## Sorting
When a column is generated from an Active Record attribute, the table is
@@ -87,4 +93,4 @@ For example, if you were using CanCan:
if can? :manage, Post
column :some_secret_data
end
- end
Please sign in to comment.
Something went wrong with that request. Please try again.