# frozen_string_literal: true
module Kaminari
  module MongoMapper
    module PluckyCriteriaMethods
      include Kaminari::PageScopeMethods

      delegate :default_per_page, :max_per_page, :max_pages, :to => :model

      def entry_name
        model.model_name.human.downcase
      end

      def limit_value #:nodoc:
        options[:limit]
      end

      def offset_value #:nodoc:
        options[:skip]
      end

      def total_count #:nodoc:
        count
      end
    end
  end
end

# frozen_string_literal: true
module Kaminari
  module MongoMapper
    module PluckyCriteriaMethods
      include Kaminari::PageScopeMethods

      delegate :default_per_page, :max_per_page, :max_pages, :to => :model

      def entry_name(options = {}) #:nodoc:
        model_name.human(options.reverse_merge(default: model_name.human.pluralize(options[:count])))
      end

      def limit_value #:nodoc:
        options[:limit]
      end

      def offset_value #:nodoc:
        options[:skip]
      end

      def total_count #:nodoc:
        count
      end
    end
  end
end

Use I18n to pluralize entries
Use I18n to pluralize entries

see: https://github.com/amatsuda/kaminari/commit/7f6e9a877d646263dc0504a5ad96ef4d5f2dd684
