lib/draper/automatic_delegation.rb in draper-2.1.0 vs lib/draper/automatic_delegation.rb in draper-3.0.0.pre1
- old
+ new
@@ -4,10 +4,10 @@
# Delegates missing instance methods to the source object.
def method_missing(method, *args, &block)
return super unless delegatable?(method)
- self.class.delegate method
+ self.singleton_class.delegate method
send(method, *args, &block)
end
# Checks if the decorator responds to an instance method, or is able to
# proxy it to the source object.