私のプロジェクトにはいくつかの ActiveResource モデルがあります。ActiveResource で to_xml を呼び出したとき、とても奇妙なことがありました。:only や :except などの to_xml に渡したオプションはまったく機能しません。ActiveRecord では、非常にうまく機能します。誰でも知っていますか?
class Node < ActiveResource::Base
self.site = NODE_SERVER
end
# node has uuid, name, type attributes
node = Node.find("3333")
node.to_xml(:only => [:uuid])
# after here, i still get all attributes