From 166c63818e901e64786a76029febf7c9cdb40f2d Mon Sep 17 00:00:00 2001 From: Bob Aman Date: Wed, 28 Jan 2009 20:56:02 +0000 Subject: Improve exception handling when Location header is invalid. [#1192 state:resolved] Signed-off-by: Pratik Naik --- activeresource/lib/active_resource/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activeresource/lib/active_resource') diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 54dde43087..94418fb559 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -1006,7 +1006,7 @@ module ActiveResource # Takes a response from a typical create post and pulls the ID out def id_from_response(response) - response['Location'][/\/([^\/]*?)(\.\w+)?$/, 1] + response['Location'][/\/([^\/]*?)(\.\w+)?$/, 1] if response['Location'] end def element_path(options = nil) -- cgit v1.2.3