Commit ebbe506864a783e1922c6fa19814811c40ca5657
1 parent
fe07438e
Exists in
master
and in
17 other branches
Only load part of ActiveModel that's required
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/searchkick.rb
1 | -require "active_model" | |
1 | +require "active_support" | |
2 | 2 | require "active_support/core_ext/hash/deep_merge" |
3 | 3 | require "elasticsearch" |
4 | 4 | require "hashie" |
... | ... | @@ -228,6 +228,7 @@ module Searchkick |
228 | 228 | end |
229 | 229 | |
230 | 230 | # TODO find better ActiveModel hook |
231 | +require "active_model/callbacks" | |
231 | 232 | ActiveModel::Callbacks.include(Searchkick::Model) |
232 | 233 | |
233 | 234 | ActiveSupport.on_load(:active_record) do | ... | ... |