Module: WillPaginate

Extended by:
PerPage
Defined in:
lib/will_paginate.rb,
lib/will_paginate/i18n.rb,
lib/will_paginate/sequel.rb,
lib/will_paginate/mongoid.rb,
lib/will_paginate/railtie.rb,
lib/will_paginate/version.rb,
lib/will_paginate/per_page.rb,
lib/will_paginate/collection.rb,
lib/will_paginate/page_number.rb,
lib/will_paginate/view_helpers.rb,
lib/will_paginate/active_record.rb,
lib/will_paginate/view_helpers/hanami.rb,
lib/will_paginate/view_helpers/sinatra.rb,
lib/will_paginate/view_helpers/action_view.rb,
lib/will_paginate/view_helpers/link_renderer.rb,
lib/will_paginate/view_helpers/link_renderer_base.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ActionView, ActiveRecord, CollectionMethods, Deprecation, Hanami, I18n, InvalidPage, Mongoid, PerPage, SequelMethods, Sinatra, VERSION, ViewHelpers Classes: Collection, PageNumber, Railtie

Class Method Summary collapse

Methods included from PerPage

extended, per_page, per_page=

Class Method Details

.PageNumber(value, name = 'page') ⇒ Object

An idemptotent coercion method



47
48
49
50
51
52
# File 'lib/will_paginate/page_number.rb', line 47

def self.PageNumber(value, name = 'page')
  case value
  when PageNumber then value
  else PageNumber.new(value, name)
  end
end