Sha256: 8b66f3e02ce43fa9f87076c8929770320f4840ed90202f4725dfde931c181ec9

Contents?: true

Size: 521 Bytes

Versions: 156

Compression:

Stored size: 521 Bytes

Contents

class FilteredList
  attr_reader :data, :facets, :paging

  def initialize(paginated_list)
    self.data   = paginated_list[:list]
    self.paging = paginated_list
  end

  def data=(data)
    @data = []
    @data = data if data.present?
  end

  def paging=(paginated_list)
    @paging = {
      total_items:  paginated_list[:list].total_count,
      current_page: paginated_list[:list].current_page,
      total_pages:  paginated_list[:list].total_pages,
      total_count:  paginated_list[:total_count]
    }
  end
end

Version data entries

156 entries across 156 versions & 1 rubygems

Version Path
cm-admin-3.0.7 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.6 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.5 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.4 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.3 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.2 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.1 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.0 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.4.6 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.4.5 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.4.4 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.4.3 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.4.2 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.4.1 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.4.0 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.3.4 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.3.3 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.3.2 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.3.1 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-2.3.0 lib/generators/cm_admin/templates/concerns/filtered_list.rb