Module: WillPaginate::ViewHelpers

Defined in:
lib/will_paginate/view_helpers.rb,
lib/will_paginate/view_helpers/base.rb,
lib/will_paginate/view_helpers/link_renderer.rb,
lib/will_paginate/view_helpers/link_renderer_base.rb

Overview

Will Paginate view helpers

The main view helper is will_paginate. It renders the pagination links for the given collection. The helper itself is lightweight and serves only as a wrapper around LinkRenderer instantiation; the renderer then does all the hard work of generating the HTML.

Read more in WillPaginate::ViewHelpers::Base

Defined Under Namespace

Modules: Base Classes: LinkRenderer, LinkRendererBase

Class Method Summary collapse

Class Method Details

.pagination_optionsObject

Global options for helpers

Options for pagination helpers are optional and get their default values from the WillPaginate::ViewHelpers.pagination_options hash. You can write to this hash to override default options on the global level:

WillPaginate::ViewHelpers.pagination_options[:previous_label] = 'Previous page'

By putting this into your environment.rb you can easily translate link texts to previous and next pages, as well as override some other defaults to your liking.



24
# File 'lib/will_paginate/view_helpers.rb', line 24

def self.pagination_options() @pagination_options; end

.pagination_options=(value) ⇒ Object

Overrides the default pagination_options



26
# File 'lib/will_paginate/view_helpers.rb', line 26

def self.pagination_options=(value) @pagination_options = value; end