Permalink
Browse files

Add associated objects display methods to docs

  • Loading branch information...
1 parent c6baabf commit 723a015440d6b8a42e05a78caf9526d7358179c9 @mattvague mattvague committed Feb 18, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 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
+ end

0 comments on commit 723a015

Please sign in to comment.