lib/asset_cloud/callbacks.rb in asset_cloud-2.7.0 vs lib/asset_cloud/callbacks.rb in asset_cloud-2.7.1

- old
+ new

@@ -57,18 +57,18 @@ end end def execute_callbacks(symbol, args) callbacks_for(symbol).each do |callback| - + result = case callback when Symbol send(callback, *args) when Proc, Method callback.call(self, *args) else - if callback.respond_to?(method) - callback.send(method, self, *args) + if callback.respond_to?(symbol) + callback.send(symbol, self, *args) else raise StandardError, "Callbacks must be a symbol denoting the method to call, a string to be evaluated, a block to be invoked, or an object responding to the callback method." end end return false if result == false