Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed Base#exists? to check status code as integer [#299 state:resolv…

…ed] (Wes Oldenbeuving)
  • Loading branch information...
commit e7a305f08d8f72f81449e1d8934fba31f038ad88 1 parent 442d2f1
@dhh dhh authored
View
5 activeresource/CHANGELOG
@@ -1,3 +1,8 @@
+*Edge*
+
+* Fixed Base#exists? to check status code as integer [#299 state:resolved] (Wes Oldenbeuving)
+
+
*2.1.0 (May 31st, 2008)*
* Fixed response logging to use length instead of the entire thing (seangeo) [#27]
View
2  activeresource/lib/active_resource/base.rb
@@ -538,7 +538,7 @@ def exists?(id, options = {})
prefix_options, query_options = split_options(options[:params])
path = element_path(id, prefix_options, query_options)
response = connection.head(path, headers)
- response.code == 200
+ response.code.to_i == 200
end
# id && !find_single(id, options).nil?
rescue ActiveResource::ResourceNotFound
Please sign in to comment.
Something went wrong with that request. Please try again.