Module: SmartPagination::Helper

Defined in:
lib/smart_pagination/helper.rb

Instance Method Summary collapse

Instance Method Details

#smart_pager_for(collection, options = {}) ⇒ Object Also known as: pager_for

Render pager links



12
13
14
15
# File 'lib/smart_pagination/helper.rb', line 12

def smart_pager_for(collection, options={})
  options = options.merge(pager_mode: true)
  SmartPagination::Renderer.new(self, collection, options).render
end

#smart_pagination_for(collection, options = {}) ⇒ Object Also known as: pagination_for

Render pagination links



4
5
6
# File 'lib/smart_pagination/helper.rb', line 4

def smart_pagination_for(collection, options={})
  SmartPagination::Renderer.new(self, collection, options).render
end

#smart_pagination_info_for(collection, options = {}) ⇒ Object Also known as: pagination_info_for

Render pagination info text



21
22
23
24
# File 'lib/smart_pagination/helper.rb', line 21

def smart_pagination_info_for(collection, options={})
  options = options.merge(info_mode: true)
  SmartPagination::Renderer.new(self, collection, options).render
end