module Kaminari::ActiveRecordRelationMethods

Active Record specific page scope methods implementations

Public Instance Methods

entry_name(options = {}) click to toggle source

Used for page_entry_info

# File lib/kaminari/activerecord/active_record_relation_methods.rb, line 5
def entry_name(options = {})
  default = options[:count] == 1 ? model_name.human : model_name.human.pluralize
  model_name.human(options.reverse_merge(default: default))
end
without_count() click to toggle source

Turn this Relation to a “without count mode” Relation. Note that the “without count mode” is supposed to be performant but has a feature limitation.

Pro: paginates without casting an extra SELECT COUNT query
Con: unable to know the total number of records/pages
# File lib/kaminari/activerecord/active_record_relation_methods.rb, line 46
def without_count
  extend ::Kaminari::PaginatableWithoutCount
end