Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

temporary fix for http://github.com/collectiveidea/delayed_job/issues…

…/issue/113

rename PerformableMethod#method -> #delayed_method to avoid overriding
Object#method
  • Loading branch information...
commit ecfc1e436d4c9b991f46ca2d3d732a6fb1060007 1 parent 6f63660
guns authored
View
2  lib/delayed/performable_mailer.rb
@@ -3,7 +3,7 @@
module Delayed
class PerformableMailer < PerformableMethod
def perform
- object.send(method, *args).deliver
+ object.send(delayed_method, *args).deliver
end
end
end
View
12 lib/delayed/performable_method.rb
@@ -1,19 +1,19 @@
module Delayed
- class PerformableMethod < Struct.new(:object, :method, :args)
- def initialize(object, method, args)
- raise NoMethodError, "undefined method `#{method}' for #{object.inspect}" unless object.respond_to?(method, true)
+ class PerformableMethod < Struct.new(:object, :delayed_method, :args)
+ def initialize(object, delayed_method, args)
+ raise NoMethodError, "undefined method `#{delayed_method}' for #{object.inspect}" unless object.respond_to?(delayed_method, true)
self.object = object
self.args = args
- self.method = method.to_sym
+ self.delayed_method = delayed_method.to_sym
end
def display_name
- "#{object.class}##{method}"
+ "#{object.class}##{delayed_method}"
end
def perform
- object.send(method, *args) if object
+ object.send(delayed_method, *args) if object
end
def method_missing(symbol, *args)
Please sign in to comment.
Something went wrong with that request. Please try again.