I found the configuration "list.per_page" of active scaffold, but i can that user enter how many records he wants to list.
I want something dynamic, because "list.per_page" is a amount static.
somebody how to know to do it?
I found the configuration "list.per_page" of active scaffold, but i can that user enter how many records he wants to list.
I want something dynamic, because "list.per_page" is a amount static.
somebody how to know to do it?
any active scaffold configuration that you need dinamically set, you can use a before_filter (or before_action in rails 4):
DEFAULT_LENGTH = 30
before_filter :set_list_length
def set_list_length
length = @current_user.settings.per_page || DEFAULT_LENGTH
active_scaffold_config.list.per_page
# you can set here almost anything you want from AS config using active_scaffold_config and @current_user
end