Sha256: 94fd76be1880d8443af3df913ccf66e78304c8dce67697b66ad0eedea15cae31
Contents?: true
Size: 797 Bytes
Versions: 15
Compression:
Stored size: 797 Bytes
Contents
module Tolk module Pagination module Methods # Kaminari defaults page_method_name to :page, will_paginate always uses # :page def pagination_method defined?(Kaminari) ? Kaminari.config.page_method_name : :page end # Kaminari defaults param_name to :page, will_paginate always uses :page def pagination_param defined?(Kaminari) ? Kaminari.config.param_name : :page end end module ViewHelper def tolk_paginate(collection, options = {}) if respond_to?(:will_paginate) # If parent app is using Will Paginate, we need to use it also will_paginate collection, options else # Otherwise use Kaminari paginate collection, options end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems