1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

better not referring Rails

This commit is contained in:
Akira Matsuda 2011-04-25 16:43:01 +09:00
parent eaf988d65c
commit 6145e2f5b3

View file

@ -4,7 +4,7 @@ module Kaminari
module InstanceMethods
# a workaround for AR 3.0.x that returns 0 for #count when page > 1
# if +limit_value+ is specified, load all the records and count them
if Rails.version < '3.1'
if ActiveRecord::VERSION::STRING < '3.1'
def count #:nodoc:
limit_value ? length : super
end