Module: Ansr::Blacklight::Solr::Response::PaginationMethods
- Includes:
- Kaminari::ConfigurationMethods::ClassMethods, Kaminari::PageScopeMethods
- Included in:
- Ansr::Blacklight::Solr::Response, Group, GroupResponse
- Defined in:
- lib/ansr_blacklight/solr/response/pagination_methods.rb
Instance Method Summary collapse
-
#limit_value ⇒ Object
:nodoc:.
- #model_name ⇒ Object
-
#next_page ⇒ Object
Methods in kaminari master that we’d like to use today.
-
#offset_value ⇒ Object
:nodoc:.
-
#prev_page ⇒ Object
Previous page number in the collection.
-
#total_count ⇒ Object
:nodoc:.
Instance Method Details
#limit_value ⇒ Object
:nodoc:
7 8 9 |
# File 'lib/ansr_blacklight/solr/response/pagination_methods.rb', line 7 def limit_value #:nodoc: rows end |
#model_name ⇒ Object
19 20 21 22 23 |
# File 'lib/ansr_blacklight/solr/response/pagination_methods.rb', line 19 def model_name if !docs.empty? and docs.first.respond_to? :model_name docs.first.model_name end end |
#next_page ⇒ Object
Methods in kaminari master that we’d like to use today. Next page number in the collection
27 28 29 |
# File 'lib/ansr_blacklight/solr/response/pagination_methods.rb', line 27 def next_page current_page + 1 unless last_page? end |
#offset_value ⇒ Object
:nodoc:
11 12 13 |
# File 'lib/ansr_blacklight/solr/response/pagination_methods.rb', line 11 def offset_value #:nodoc: start end |
#prev_page ⇒ Object
Previous page number in the collection
32 33 34 |
# File 'lib/ansr_blacklight/solr/response/pagination_methods.rb', line 32 def prev_page current_page - 1 unless first_page? end |
#total_count ⇒ Object
:nodoc:
15 16 17 |
# File 'lib/ansr_blacklight/solr/response/pagination_methods.rb', line 15 def total_count #:nodoc: total end |