mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
require 'dm-aggregates' in DataMapper hook
To work fine Kaminari need dm-aggregates so it's better to require it if the DataMapper extension is active to be sure this gem is install in runtime and can avoid some issue see #220
This commit is contained in:
parent
82a38e07db
commit
ed77a2215b
1 changed files with 1 additions and 0 deletions
|
@ -8,6 +8,7 @@ module Kaminari
|
|||
|
||||
begin; require 'data_mapper'; rescue LoadError; end
|
||||
if defined? ::DataMapper
|
||||
require 'dm-aggregates'
|
||||
require 'kaminari/models/data_mapper_extension'
|
||||
::DataMapper::Collection.send :include, Kaminari::DataMapperExtension::Collection
|
||||
::DataMapper::Model.append_extensions Kaminari::DataMapperExtension::Model
|
||||
|
|
Loading…
Reference in a new issue