lib/erp_search/engine.rb in erp_search-3.1.2 vs lib/erp_search/engine.rb in erp_search-4.0.0
- old
+ new
@@ -24,11 +24,12 @@
include ErpSearch::Extensions::ActiveRecord::HasDynamicSolrSearch
end
end
ErpSearch::Engine.config.after_initialize do
+ # DynamicFormModel has been removed.
# setup sunspot for all dynamic form models if we're using USE_SOLR_FOR_DYNAMIC_FORM_MODELS
- DynamicFormModel.sunspot_setup_all if Object.const_defined?('ErpForms') and ErpForms.use_solr? and ActiveRecord::Base.connection.table_exists?('dynamic_form_models')
+ DynamicFormModel.sunspot_setup_all if Object.class_exists?('ErpForms') and ErpForms.use_solr? and ActiveRecord::Base.connection.table_exists?('dynamic_form_models')
end
if USE_PARTY_SEARCH_FACTS
# Add observers (this is ugly need a better way)
observers = [:party_observer, :contact_observer]