Skip to content

Commit

Permalink
Add associated objects display methods to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mattvague committed Feb 18, 2012
1 parent c6baabf commit 723a015
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/3-index-pages/index-as-table.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ column method:
column :title column :title
end 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: If the default title does not work for you, pass it as the first argument:


index do index do
Expand Down Expand Up @@ -53,7 +60,6 @@ Alternatively, you can create a column with custom links:
end end
end end



## Sorting ## Sorting


When a column is generated from an Active Record attribute, the table is When a column is generated from an Active Record attribute, the table is
Expand Down Expand Up @@ -87,4 +93,4 @@ For example, if you were using CanCan:
if can? :manage, Post if can? :manage, Post
column :some_secret_data column :some_secret_data
end end
end end

0 comments on commit 723a015

Please sign in to comment.