8000 Update documentation for including associated objects (#5824) · activeadmin/activeadmin@f0e88ca · GitHub
[go: up one dir, main page]

Skip to content

Commit f0e88ca

Browse files
jstumbaughjavierjulio
authored andcommitted
Update documentation for including associated objects (#5824)
1 parent d0cbadd commit f0e88ca

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/3-index-pages/index-as-table.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ controller do
193193
end
194194
```
195195

196+
You can also define associated objects to include outside of the
197+
`scoped_collection` method:
198+
199+
```ruby
200+
includes :publisher
201+
```
202+
196203
Then it's simple to sort by any Publisher attribute from within the index table:
197204

198205
```ruby

lib/active_admin/views/index_as_table.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ module Views
192192
# end
193193
# ```
194194
#
195+
# You can also define associated objects to include outside of the
196+
# `scoped_collection` method:
197+
#
198+
# ```ruby
199+
# includes :publisher
200+
# ```
201+
#
195202
# Then it's simple to sort by any Publisher attribute from within the index table:
196203
#
197204
# ```ruby

0 commit comments

Comments
 (0)
0