Skip to content

Commit

Permalink
Fixed Base#exists? to check status code as integer [#299 state:resolv…
Browse files Browse the repository at this point in the history
…ed] (Wes Oldenbeuving)
  • Loading branch information
dhh committed Jun 3, 2008
1 parent 442d2f1 commit e7a305f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions 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]
Expand Down
2 changes: 1 addition & 1 deletion activeresource/lib/active_resource/base.rb
Expand Up @@ -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
Expand Down

0 comments on commit e7a305f

Please sign in to comment.