"NameError: uninitialized constant Kaminari::ActiveRecord::VERSION"

This commit is contained in:
Akira Matsuda 2016-06-30 19:57:50 +09:00
parent 18b6b50c99
commit e81c8ce042
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module Kaminari
# Rails 4.1 removes the `options` argument from AR::Relation#count
args = [column_name]
args << options if ActiveRecord::VERSION::STRING < '4.1.0'
args << options if ::ActiveRecord::VERSION::STRING < '4.1.0'
# .group returns an OrderedHash that responds to #count
c = c.count(*args)