Module: Upmin::Railties::Paginator

Defined in:
lib/upmin/railties/paginator.rb

Instance Method Summary collapse

Instance Method Details

#up_paginate(scope, options = {}, &block) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/upmin/railties/paginator.rb', line 5

def up_paginate(scope, options = {}, &block)
  if defined?(WillPaginate)
    options[:renderer] = BootstrapPagination::Rails if defined?(BootstrapPagination::Rails)
    return will_paginate(scope, options)
  else # Use Kaminari
    return paginate(scope, options, &block)
  end
end