Sha256: c62f0318f8d3d198a1257ca4fd98aaad091aae9ebfdddec680ae6fad2b6899c1

Contents?: true

Size: 357 Bytes

Versions: 4

Compression:

Stored size: 357 Bytes

Contents

# frozen_string_literal: true

class Core::Builders::Pagination < RiderKick::Builders::AbstractActiveRecordEntityBuilder
  acts_as_builder_for_entity Core::Entities::Pagination

  def attributes_for_entity
    {
      total_count: params.count,
      page:        params.page,
      per_page:    params.limit,
      page_count:  params.last
    }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rider-kick-0.0.8 lib/generators/rider_kick/templates/domains/core/builders/pagination.rb.tt
rider-kick-0.0.7 lib/generators/rider_kick/templates/domains/core/builders/pagination.rb.tt
rider-kick-0.0.6 lib/generators/rider_kick/templates/domains/core/builders/pagination.rb.tt
rider-kick-0.0.5 lib/generators/rider_kick/templates/domains/core/builders/pagination.rb.tt