Sha256: e21773cdbb7db9210582ff1f02f53e726e222bbd2bc9b8049c07978b43165c1b

Contents?: true

Size: 333 Bytes

Versions: 5

Compression:

Stored size: 333 Bytes

Contents

module DynamicSunspotSearch
  module Translator
    module Paginate
      def self.apply(query_object, pagination)
        return unless pagination.present?
        query_object.tap do |search|
          Array.wrap(pagination).each do |paging|
            search.paginate paging
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dynamic_sunspot_search-0.1.4 lib/dynamic_sunspot_search/translator/paginate.rb
dynamic_sunspot_search-0.1.3 lib/dynamic_sunspot_search/translator/paginate.rb
dynamic_sunspot_search-0.1.2 lib/dynamic_sunspot_search/translator/paginate.rb
dynamic_sunspot_search-0.1.1 lib/dynamic_sunspot_search/translator/paginate.rb
dynamic_sunspot_search-0.1.0 lib/dynamic_sunspot_search/translator/paginate.rb