Sha256: 040320832e84215e75ba9000a8b72ff148c2900c70473169f0e1d4e6f89b4663

Contents?: true

Size: 383 Bytes

Versions: 5

Compression:

Stored size: 383 Bytes

Contents

module Trailblazer
  class Finder
    module Adapters
      # WillPaginate Adapter
      module WillPaginate
        def self.included(base)
          base.extend Features::Paging::ClassMethods
        end

        private

        def apply_paging(entity_type)
          entity_type.paginate per_page: per_page, page: page.zero? ? nil : page
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trailblazer-finder-0.1.4 lib/trailblazer/finder/adapters/will_paginate.rb
trailblazer-finder-0.1.3 lib/trailblazer/finder/adapters/will_paginate.rb
trailblazer-finder-0.1.2 lib/trailblazer/finder/adapters/will_paginate.rb
trailblazer-finder-0.1.1 lib/trailblazer/finder/adapters/will_paginate.rb
trailblazer-finder-0.1.0 lib/trailblazer/finder/adapters/will_paginate.rb