Skip to content
Browse files

code improved

  • Loading branch information...
1 parent 3521598 commit 4e79deff898737ec5985f531923933434ed19477 @sachin87 sachin87 committed Jan 24, 2012
Showing with 3 additions and 6 deletions.
  1. +3 −6 activeresource/lib/active_resource/http_mock.rb
View
9 activeresource/lib/active_resource/http_mock.rb
@@ -291,12 +291,9 @@ def initialize(body, message = 200, headers = {})
if resp_cls && !resp_cls.body_permitted?
@body = nil
end
-
- if @body.nil?
- self['Content-Length'] = "0"
- else
- self['Content-Length'] = body.size.to_s
- end
+
+ self['Content-Length'] = @body.nil? ? "0" : body.size.to_s
+
end
# Returns true if code is 2xx,

0 comments on commit 4e79def

Please sign in to comment.
Something went wrong with that request. Please try again.