I just remembered the second part of my last question...<br><br>I have a superclass, Resource, which has two subclasses, TeachingObject and LearningObject. All the records that are saved are one of the subclasses. However, i'd like to be able to do a ferret search on Resource and get both kinds of subclass, like when i do Resource.find(), which returns both kinds.<br>
<br>I'm having problems with the index though: TeachingObject and LearningObject both have :store_class_name => true, and they have their own indexes. When i try to build the index for Resource, it crashes with the following trace, whether i have :store_class_name => true set for Resource or not. Any ideas, anyone?<br>
<br>thanks, max<br><br>NoMethodError: You have a nil object when you didn't expect it!<br>The error occurred while evaluating nil.each_pair<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/instance_methods.rb:130:in `to_doc'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/object/misc.rb:28:in `returning'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/instance_methods.rb:124:in `to_doc'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/bulk_indexer.rb:19:in `index_records'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/bulk_indexer.rb:19:in `each'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/bulk_indexer.rb:19:in `index_records'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/bulk_indexer.rb:29:in `measure_time'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/bulk_indexer.rb:18:in `index_records'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/ferret_extensions.rb:52:in `index_model'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/class_methods.rb:79:in `records_for_rebuild'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/rails/activerecord/lib/active_record/transactions.rb:80:in `transaction'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/class_methods.rb:74:in `records_for_rebuild'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/ferret_extensions.rb:51:in `index_model'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/ferret_extensions.rb:39:in `index_models'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/ferret_extensions.rb:39:in `each'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/ferret_extensions.rb:39:in `index_models'<br>
from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/local_index.rb:54:in `rebuild_index'<br> from /home/jars/rails/lesson_planner/branches/bundles/vendor/plugins/acts_as_ferret/lib/class_methods.rb:28:in `rebuild_index'<br>
<br><br><br>