1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixed Base#exists? to check status code as integer [#299 state:resolved] (Wes Oldenbeuving)

This commit is contained in:
David Heinemeier Hansson 2008-06-02 21:58:42 -05:00
parent 442d2f1032
commit e7a305f08d
2 changed files with 6 additions and 1 deletions

View file

@ -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 file

@ -538,7 +538,7 @@ module ActiveResource
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