lib/thinking_sphinx/search.rb in hawkerb-thinking-sphinx-1.3.17 vs lib/thinking_sphinx/search.rb in hawkerb-thinking-sphinx-1.3.18

- old
+ new

@@ -282,11 +282,11 @@ next if object.respond_to?(:excerpts) excerpter = ThinkingSphinx::Excerpter.new self, object block = lambda { excerpter } - object.metaclass.instance_eval do + object.singleton_class.instance_eval do define_method(:excerpts, &block) end end end @@ -295,11 +295,11 @@ next if object.nil? || object.respond_to?(:sphinx_attributes) match = match_hash object next if match.nil? - object.metaclass.instance_eval do + object.singleton_class.instance_eval do define_method(:sphinx_attributes) { match[:attributes] } end end end @@ -311,10 +311,10 @@ next if match.nil? fields = ThinkingSphinx::Search.matching_fields( @results[:fields], match[:weight] ) - object.metaclass.instance_eval do + object.singleton_class.instance_eval do define_method(:matching_fields) { fields } end end end