lib/backgrounded/handler/resque_handler.rb in backgrounded-0.7.4 vs lib/backgrounded/handler/resque_handler.rb in backgrounded-0.7.5

- old
+ new

@@ -25,13 +25,13 @@ def self.find_instance(clazz, id, method) clazz = clazz.constantize id.to_i == INVALID_ID ? clazz : clazz.find(id) end def instance_identifiers(object) - instance, id = if object.is_a?(Class) - [object.name, INVALID_ID] - else + instance, id = if object.kind_of?(ActiveRecord::Base) [object.class.name, object.id] + else + [object.name, INVALID_ID] end end end end end