rails/activeresource
/entries を /entry に変更したい場合
collection_name メソッドに設定したい URI を設定すればいけそうね。
class Entry < ActiveResource::Base
self.collection_name = 'entry'
self.site = "http://foo.bar.com/"
end
実際には activeresource/base.rb の prefix メソッドのコメントとか見るとわかるように
# Gets the resource prefix
# prefix/collectionname/1.xml
def prefix(options={})
ってなっていて collection_name メソッドで設定すればいけることがわかりますね。
ちなみに、element_name メソッドで設定するのもいけそうね。
2007年05月30日(水) 02:31:58 Modified by koziy