lib/backgrounded/handler/resque_handler.rb in backgrounded-0.7.1 vs lib/backgrounded/handler/resque_handler.rb in backgrounded-0.7.2
- old
+ new
@@ -6,10 +6,10 @@
class ResqueHandler
DEFAULT_QUEUE = 'backgrounded'
@@queue = DEFAULT_QUEUE
def request(object, method, *args)
- options = object.backgrounded_options[method.to_sym]
+ options = object.send("#{method.to_s.sub(/([?!=])$/, '')}_backgrounded_options")
@@queue = options[:queue] || DEFAULT_QUEUE
instance, id = instance_identifiers(object)
Resque.enqueue(ResqueHandler, instance, id, method, *args)
end
def self.queue