.card.bg-light .card-body %h2= current_page_title %p In addition to %a{href: integration_with_application_view_index_path} %code current_page_records and %a{href: integration_with_application_view_index_path} %code current_page_records helpers a callback can be setup in the controller which is executed when a grid page is rendered. Though the results of that processing is rendered on page, normally such callbacks are used for some kind of background processing. Please notice that the callback is executed %em after the controller action and thus all controller instance variables have already been injected into the view, that is why the current example has a definition of %code @one_page_records %em before the callback, so that the object is injected into the view and the callback block has access to the object as well. The callback can be setup separately as a block: :plain
@grid.with_paginated_resultset do |records| ... endor as an argument of %code initialize_grid where the value is the name of the method to be invoked: :plain
@grid = initialize_grid(Task, with_paginated_resultset: :process_records )= show_code = render 'grid' .row .col-md-12 .card.bg-light .card-body = @one_page_records.size records on the current page: = @one_page_records.map(&:id).to_sentence