lib/cleo.rb in acts_as_cleo-2.4.3 vs lib/cleo.rb in acts_as_cleo-2.4.4
- old
+ new
@@ -4,11 +4,10 @@
#define delete, update, create dynamically in order to set up reddis backed calls if enabled
#Cleo.update(obj) will respect async settings
%w{delete update create}.each do |mn|
define_singleton_method(mn.to_s) do |obj|
if Cleo::Server.async?
- obj_id = obj.is_a?(Fixnum) ? obj : obj.id
- Resque.enqueue(Cleo::Processor, mn, obj.record_type.classify, obj.id)
+ Resque.enqueue(Cleo::Processor, mn, obj.class.name, obj.id)
else
Cleo.send("execute_#{mn}".to_sym, obj)
end
end
end