lib/searchlogic.rb in aq1018-searchlogic-2.4.15 vs lib/searchlogic.rb in aq1018-searchlogic-2.4.16
- old
+ new
@@ -12,9 +12,15 @@
require "searchlogic/search"
Proc.send(:include, Searchlogic::CoreExt::Proc)
Object.send(:include, Searchlogic::CoreExt::Object)
+
+# Must load ActiveRecord::ActiveRecordError first before loading ActiveRecord::Associations
+# See this bug ticket:
+# https://rails.lighthouseapp.com/projects/8994/tickets/2577-when-using-activerecordassociations-outside-of-rails-a-nameerror-is-thrown
+ActiveRecord::ActiveRecordError
+
module ActiveRecord # :nodoc: all
module Associations
class AssociationProxy
include Searchlogic::ActiveRecord::AssociationProxyOverrides
end