From 7f4d8e3fbd704cf1005a46309e3795192b114013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 15 Jan 2010 11:01:37 +0100 Subject: Yield the payload notifications for further modification (like adding the result). --- activeresource/lib/active_resource/connection.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activeresource/lib') diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index ee700700ae..d06543d700 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -106,9 +106,9 @@ module ActiveResource private # Makes a request to the remote service. def request(method, path, *arguments) - result = ActiveSupport::Notifications.instrument!("active_resource.request", - :method => method, :path => path, :site => site) do - http.send(method, path, *arguments) + result = ActiveSupport::Notifications.instrument("active_resource.request", + :method => method, :path => path, :site => site) do |payload| + payload[:result] = http.send(method, path, *arguments) end handle_response(result) rescue Timeout::Error => e -- cgit v1.2.3