Module: Card::Set::Abstract::Paging::PagingViews::Format
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod002-collection/abstract/paging/paging_views.rb
Instance Method Summary collapse
-
#fewer_results_than_limit? ⇒ Boolean
clear we don’t need paging even before running count query.
-
#show_paging? ⇒ Boolean
Instance Method Details
#fewer_results_than_limit? ⇒ Boolean
clear we don’t need paging even before running count query
18 19 20 21 22 |
# File 'platypus/tmp/set/gem-defaults/mod002-collection/abstract/paging/paging_views.rb', line 18 def fewer_results_than_limit? return false unless offset.zero? limit > offset + search_with_params.length end |
#show_paging? ⇒ Boolean
9 10 11 12 13 14 15 |
# File 'platypus/tmp/set/gem-defaults/mod002-collection/abstract/paging/paging_views.rb', line 9 def show_paging? return false if limit < 1 return false if fewer_results_than_limit? # avoid extra count search # count search result instead limit < count_with_params end |