Sha256: 1daf09b6654f8c54e5d82ebe7306c6fed8096e9f9c0a6ed675950147b9c37729

Contents?: true

Size: 361 Bytes

Versions: 16

Compression:

Stored size: 361 Bytes

Contents

module Locomotive
  module API
    module Helpers
      module PaginationHelper

        def add_pagination_header(collection)
          header 'X-Total-Pages',   collection.total_pages.to_s
          header 'X-Per-Page',      collection.limit_value.to_s
          header 'X-Total-Entries', collection.total_count.to_s
        end

      end

    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.2.0.alpha1 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.1.1 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.1.0 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.1.0.rc1 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.0.3 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.0.2 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.0.1 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.0.0 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.0.0.rc0 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.0.0.alpha3 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-3.4.1 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.0.0.alpha2 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-4.0.0.alpha1 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-3.4.0 app/api/locomotive/api/helpers/pagination_helper.rb
locomotivecms-3.3.0 app/api/locomotive/api/helpers/pagination_helper.rb