diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-30 12:47:23 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-10-30 12:47:23 +0100 |
commit | dffc2e2b64c89fdb0303bd18eccc7351ed0a0a58 (patch) | |
tree | 71b9429a420c6c8dbb272e4a1236ede773c46b67 /activeresource/lib/active_resource | |
parent | ea2545fd8dfcaafcf6eff58c0afe57c55e2c6317 (diff) | |
download | rails-dffc2e2b64c89fdb0303bd18eccc7351ed0a0a58.tar.gz rails-dffc2e2b64c89fdb0303bd18eccc7351ed0a0a58.tar.bz2 rails-dffc2e2b64c89fdb0303bd18eccc7351ed0a0a58.zip |
Fixed that ActiveResource#post would post an empty string when it shouldn't be posting anything (Paolo Angelini) [#525 state:committed]
Diffstat (limited to 'activeresource/lib/active_resource')
-rw-r--r-- | activeresource/lib/active_resource/custom_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/custom_methods.rb b/activeresource/lib/active_resource/custom_methods.rb index 24306f251d..4647e8342c 100644 --- a/activeresource/lib/active_resource/custom_methods.rb +++ b/activeresource/lib/active_resource/custom_methods.rb @@ -90,7 +90,7 @@ module ActiveResource end def post(method_name, options = {}, body = nil) - request_body = body.nil? ? encode : body + request_body = body.blank? ? encode : body if new? connection.post(custom_method_new_element_url(method_name, options), request_body, self.class.headers) else |