Returns the list of objects browsable through all pages with the current
filters. Should only be called after the grid
helper.
# File lib/wice_grid.rb, line 449 def all_pages_records raise WiceGridException.new("all_pages_records can only be called only after the grid view helper") unless self.view_helper_finished resultset_without_paging_with_user_filters end
Returns the list of objects displayed on current page. Should only be
called after the grid
helper.
# File lib/wice_grid.rb, line 455 def current_page_records raise WiceGridException.new("current_page_records can only be called only after the grid view helper") unless self.view_helper_finished @resultset end
A block executed from within the plugin to process records of the current page. The argument to the callback is the array of the records. See the README for more details.
# File lib/wice_grid.rb, line 161 def with_paginated_resultset(&callback) @options[:with_paginated_resultset] = callback end
A block executed from within the plugin to process all records browsable through all pages with the current filters. The argument to the callback is a lambda object which returns the list of records when called. See the README for the explanation.
# File lib/wice_grid.rb, line 168 def with_resultset(&callback) @options[:with_resultset] = callback end