usages of active resouce

This commit is contained in:
Vishnu Atrai
2011-07-30 18:24:18 +05:30
committed by Xavier Noria
parent 8d1c642cae
commit c62cb2f2fb

View File

@@ -21,6 +21,15 @@ class Person < ActiveResource::Base
end
</ruby>
Now the Person class is REST enabled and can invoke REST services very similarly to how Active Record invokes
life cycle methods that operate against a persistent store.
<ruby>
# Find a person with id = 1
ryan = Person.find(1)
Person.exists?(1) # => true
</ruby>
h3. Changelog
* July 30, 2011: Initial version by "Vishnu Atrai":http://github.com/vatrai