Module: WillPaginate

Extended by:
PerPage
Defined in:
lib/will_paginate.rb,
lib/will_paginate/i18n.rb,
lib/will_paginate/sequel.rb,
lib/will_paginate/railtie.rb,
lib/will_paginate/version.rb,
lib/will_paginate/mongoid.rb,
lib/will_paginate/per_page.rb,
lib/will_paginate/collection.rb,
lib/will_paginate/data_mapper.rb,
lib/will_paginate/page_number.rb,
lib/will_paginate/view_helpers.rb,
lib/will_paginate/active_record.rb,
lib/will_paginate/view_helpers/merb.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, DataMapper, Deprecation, I18n, InvalidPage, Merb, 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

+ (Object) PageNumber(value, name = 'page')

An idemptotent coercion method



51
52
53
54
55
56
# File 'lib/will_paginate/page_number.rb', line 51

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