Skip to content

Commit

Permalink
Merge pull request #322 from lleger/master
Browse files Browse the repository at this point in the history
Wait to load PgSearch::Document until after ActiveRecord has loaded
  • Loading branch information
nertzy authored Dec 21, 2016
2 parents 23cb9bc + 4a3e0f0 commit d4af95c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/pg_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,8 @@ def message
end
end

require "pg_search/document"
ActiveSupport.on_load(:active_record) do
require "pg_search/document"
end

require "pg_search/railtie" if defined?(Rails)

0 comments on commit d4af95c

Please sign in to comment.