Module: Kaminari::Sequel::DatasetMethods

Defined in:
lib/kaminari/sequel/dataset_methods.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#entry_name(_options = {}) ⇒ Object

:nodoc:


8
9
10
# File 'lib/kaminari/sequel/dataset_methods.rb', line 8

def entry_name(_options = {}) #:nodoc:
  model.to_s.downcase
end

#limit_valueObject

:nodoc:


12
13
14
# File 'lib/kaminari/sequel/dataset_methods.rb', line 12

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

#offset_valueObject

:nodoc:


16
17
18
# File 'lib/kaminari/sequel/dataset_methods.rb', line 16

def offset_value #:nodoc:
  opts[:offset]
end

#sizeObject

:nodoc:


24
25
26
# File 'lib/kaminari/sequel/dataset_methods.rb', line 24

def size #:nodoc:
  model.count
end

#total_count(_column_name = :all, _options = nil) ⇒ Object

:nodoc:


20
21
22
# File 'lib/kaminari/sequel/dataset_methods.rb', line 20

def total_count(_column_name = :all, _options = nil) #:nodoc:
  @total_count ||= unlimited.unordered.count
end