Skip to content
Browse files

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

…ed] (Wes Oldenbeuving)
  • Loading branch information...
1 parent 442d2f1 commit e7a305f08d8f72f81449e1d8934fba31f038ad88 @dhh dhh committed
Showing with 6 additions and 1 deletion.
  1. +5 −0 activeresource/CHANGELOG
  2. +1 −1 activeresource/lib/active_resource/base.rb
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

0 comments on commit e7a305f

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