Class: Wor::Paginate::Adapters::KaminariAlreadyPaginated
- Inherits:
-
Base
- Object
- Base
- Wor::Paginate::Adapters::KaminariAlreadyPaginated
show all
- Defined in:
- lib/wor/paginate/adapters/kaminari_already_paginated.rb
Instance Attribute Summary
Attributes inherited from Base
#page
Instance Method Summary
collapse
Methods inherited from Base
#adapt?, #initialize, #next_page, #previous_page
Instance Method Details
#count ⇒ Object
20
21
22
|
# File 'lib/wor/paginate/adapters/kaminari_already_paginated.rb', line 20
def count
@content.count
end
|
#paginated_content ⇒ Object
16
17
18
|
# File 'lib/wor/paginate/adapters/kaminari_already_paginated.rb', line 16
def paginated_content
@paginated_content ||= @content.page(@page).per(@limit)
end
|
#required_methods ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/wor/paginate/adapters/kaminari_already_paginated.rb', line 7
def required_methods
%i[padding total_count total_pages current_page prev_page]
end
|
#total_count ⇒ Object
24
25
26
|
# File 'lib/wor/paginate/adapters/kaminari_already_paginated.rb', line 24
def total_count
@content.total_count
end
|
#total_pages ⇒ Object
28
29
30
|
# File 'lib/wor/paginate/adapters/kaminari_already_paginated.rb', line 28
def total_pages
@content.total_pages
end
|