lib/agnostic_backend/indexable/indexable.rb in agnostic_backend-1.0.3 vs lib/agnostic_backend/indexable/indexable.rb in agnostic_backend-1.0.4
- old
+ new
@@ -121,10 +121,10 @@
def trigger_index_notification
return unless respond_to? :_index_root_notifiers
_index_root_notifiers.each do |index_name, block|
obj = instance_eval &block
- obj = [obj] unless obj.is_a? Enumerable
+ obj = [obj] unless obj.respond_to? :each
obj.each { |o| o.index_object(index_name) if o.present? }
end
end
end
end