-
Notifications
You must be signed in to change notification settings - Fork 2.3k
List
bbenezech edited this page Dec 26, 2011
·
28 revisions
Section used for the index view.
It inherits its configuration from the base
section.
Number of items per page
You can configure the default number of rows rendered per page:
RailsAdmin.config do |config|
config.default_items_per_page = 50
end
Number of items per page per model
You can also configure it per model:
RailsAdmin.config do |config|
config.model Team do
list do
items_per_page 100
end
end
end
Default sorting
By default, rows sorted by the field id
in reverse order
You can change default behavior with use two options: sort_by
and sort_reverse
Default sorting - Configure globally
RailsAdmin.config do |config|
config.models do
list do
sort_by :updated_at
sort_reverse true # already default for serials ids and dates
end
end
end
Default sorting - Configure per model
RailsAdmin.config do |config|
config.model Player do
list do
sort_by :name
sort_reverse false
end
end
end