Permalink
Browse files

usages of active resouce

  • Loading branch information...
vishnuatrai authored and fxn committed Jul 30, 2011
1 parent 95c2230 commit ad55b1aa86a1d8b7d6e9e35c7cce77b122bca1e1
Showing with 9 additions and 0 deletions.
  1. +9 −0 railties/guides/source/active_resource_basics.textile
@@ -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

0 comments on commit ad55b1a

Please sign in to comment.