Hello,

Can anyone explain to me a certain behaviour of ActiveResource:

Assuming there is an ActiveResource class like the following:

  class Shop < ActiveResource::Base
    self.site = "http://site.com/operators/:operator_id";
  end


After I read a shop from the server, the ActiveResource instance does not
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 and
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 self.site path.

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

This is Rails 2.2.2

-- 
Best regards,
Yuri Leikind

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to