AR 3.0: call the original count method if :distinct option was given
fixes #453
This commit is contained in:
parent
7c228ff673
commit
b2221f7b19
|
@ -4,7 +4,7 @@ module Kaminari
|
|||
# if +limit_value+ is specified, load all the records and count them
|
||||
if ActiveRecord::VERSION::STRING < '3.1'
|
||||
def count(column_name = nil, options = {}) #:nodoc:
|
||||
limit_value ? length : super(column_name, options)
|
||||
limit_value && !options[:distinct] ? length : super(column_name, options)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue