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:
parent
eaf988d65c
commit
6145e2f5b3
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue