ActiveResource, find(1) works but no find(:all)

Hi,

I’m on edge and Fuser.find(1) works but Fuser.find(:all) shows the error
[1]. Fuser is declared here [2]. Do you know what’s happening? Thanks.

[1]

ActiveResource::ServerError: Failed with 500 Internal Server Error
from
/…/vendor/rails/activeresource/lib/active_resource/connection.rb:124:in
handle_response' from /.../vendor/rails/activeresource/lib/active_resource/connection.rb:103:in request’
from
/…/vendor/rails/activeresource/lib/active_resource/connection.rb:74:in
get' from /.../vendor/rails/activeresource/lib/active_resource/base.rb:442:in find_every’
from
/…/vendor/rails/activeresource/lib/active_resource/base.rb:385:in
`find’
from (irb):2

[2]

class FuserResource < ActiveResource::Base
self.site = “http://localhost:3000/
end
class Fuser < FuserResource
end

The error is [3] instead of [1], sorry. The method collect belongs to
the module Enumerable, but no collect!. Is it exist or not?

[3]

NoMethodError: undefined method collect!' for #<Hash:0xb7539e60> from /.../vendor/rails/activeresource/lib/active_resource/base.rb:465:ininstantiate_collection’
from
/…/vendor/rails/activeresource/lib/active_resource/base.rb:442:in
find_every' from /.../vendor/rails/activeresource/lib/active_resource/base.rb:385:infind’
from (irb):4

Therefore… Is ActiveResource wrong? or what am I missing?

William P. wrote:

According to the ruby docs, collect! is defined under Array not Hash.

According to the ruby docs, collect! is defined under Array not Hash.

http://dev.rubyonrails.org/ticket/8798