Module: WillPaginate::PerPage

Included in:
WillPaginate, ActiveRecord
Defined in:
lib/will_paginate/per_page.rb

Defined Under Namespace

Modules: Inheritance

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



11
12
13
# File 'lib/will_paginate/per_page.rb', line 11

def self.extended(base)
  base.extend Inheritance if base.is_a? Class
end

Instance Method Details

#per_pageObject



3
4
5
# File 'lib/will_paginate/per_page.rb', line 3

def per_page
  defined?(@per_page) ? @per_page : WillPaginate.per_page
end

#per_page=(limit) ⇒ Object



7
8
9
# File 'lib/will_paginate/per_page.rb', line 7

def per_page=(limit)
  @per_page = limit.to_i
end