Sha256: 9880e95fc822ddaf2be853a6997ad08c7e534107b0cfc7f0b4c661667b503d5d

Contents?: true

Size: 761 Bytes

Versions: 12

Compression:

Stored size: 761 Bytes

Contents

# encoding: utf-8
class ResultsetProcessingsController < ApplicationController
  def index
    @tasks_grid = initialize_grid(Task,
      include: [:priority, :status, :project, :assigned_users],
      order: 'statuses.name',
      name: 'g',
      per_page: 10,
      # :with_paginated_resultset => :process_records,
      custom_order: {
        'tasks.priority_id' => 'priorities.name',
        'tasks.status_id' => 'statuses.position',
        'tasks.project_id' => 'projects.name'
      }

    )

    @one_page_records = []

    @tasks_grid.with_paginated_resultset do |records|
      records.each { |rec| @one_page_records << rec }
    end
  end

  protected

  # def process_records(records)
  #   records.each{|rec| @one_page_records << rec}
  # end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
wice_grid-6.1.3 spec/support/test_app/app/controllers/resultset_processings_controller.rb
wice_grid-6.1.2 spec/support/test_app/app/controllers/resultset_processings_controller.rb
wice_grid-6.1.1 spec/support/test_app/app/controllers/resultset_processings_controller.rb
wice_grid-6.1.0 spec/support/test_app/app/controllers/resultset_processings_controller.rb
pwice_grid-7.0.0 spec/support/test_app/app/controllers/resultset_processings_controller.rb
pwice_grid-6.1.2 spec/support/test_app/app/controllers/resultset_processings_controller.rb
pwice_grid-6.1.1 spec/support/test_app/app/controllers/resultset_processings_controller.rb
pwice_grid-6.1.0 spec/support/test_app/app/controllers/resultset_processings_controller.rb
pwice_grid-5.0.2 spec/support/test_app/app/controllers/resultset_processings_controller.rb
pwice_grid-5.0.1 spec/support/test_app/app/controllers/resultset_processings_controller.rb
pwice_grid-5.0.0 spec/support/test_app/app/controllers/resultset_processings_controller.rb
wice_grid-4.1.0 spec/support/test_app/app/controllers/resultset_processings_controller.rb