Can someone give me a quick rundown on ActiveResource? Is is included
in rails 1.2.3? How do I start using it? How does it work with
ActiveRecord? Is there a script/generate command for it? Where is the
documentation and tutorials?
Active Resource has yet to get an official release. It's not included
in 1.2.3, only available from SVN.
I submitted a patch to do just this but was told that ARes will probably be an external install from Rails. For now, as says the guide DHH posted, you’ll need to manually type out the path to the activeresource install. Otherwise, the library works quite well and I’ve yet to find any issues with it.
Simply define your models to be:
class MyResource < ActiveResource::Base
self.site_url = “http://path/to/server”
… credentials …
end
and you’re on your way. You only get #find for now, depending on how much data the server is sending back (the :include directive of to_xml).