Forum: Ruby on Rails @prefix_options in ActiveResource

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Yuri L. (Guest)
on 2009-03-09 15:33
(Received via mailing list)

Can anyone explain to me a certain behaviour of ActiveResource:

Assuming there is an ActiveResource class like the following:

  class Shop < ActiveResource::Base = ""

After I read a shop from the server, the ActiveResource instance does
contain operator_id in  @attributes, and
consequently, no setter and getter methods.

A shop belongs to an operator, the attribute is present in the xml sent
I would really expect this to happen.

Instead of @attributes the attribute is present is @prefix_options:

#<Shop:0x1819f74 @prefix_options={:operator_id=>1} ...

This happens regularly with all attributes present in the

If this is a feature, could anyone please enlighten me of its true
for I find this
extremely irritating.

This is Rails 2.2.2

Best regards,
Yuri L.
This topic is locked and can not be replied to.