# @prefix\_options in ActiveResource

**URL:** <https://www.ruby-forum.com/t/prefix-options-in-activeresource/162386>\
**Category:** Rails\
**Created:** [March 9, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/prefix-options-in-activeresource/162386 "2009-03-09T14:33:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuleven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Post date:** [March 9, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/prefix-options-in-activeresource/162386/1 "2009-03-09T14:33:43Z")

</div>

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](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 L.
