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

For Ruby < 2.4

This commit is contained in:
Akira Matsuda 2021-12-20 02:54:04 +09:00
parent 9778bcd7ea
commit 8786b5eed1

View file

@ -65,7 +65,7 @@ module Kaminari
if @arel
case @arel.limit.class.name
when 'Integer'
when 'Integer', 'Fixnum'
@arel.limit = new_limit
when 'ActiveModel::Attribute::WithCastValue' # comparing by class name because ActiveModel::Attribute::WithCastValue is a private constant
@arel.limit = build_cast_value 'LIMIT', new_limit