diff options
author | Vishnu Atrai <vishnu.atrai@gmail.com> | 2011-07-30 18:24:18 +0530 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:11 -0700 |
commit | ad55b1aa86a1d8b7d6e9e35c7cce77b122bca1e1 (patch) | |
tree | dc888808f780c0cb1e706986a6ba9cd3d4d90f59 /railties/guides | |
parent | 95c2230f0577c8f3ef2312fe9268dc9c0ed3bf8a (diff) | |
download | rails-ad55b1aa86a1d8b7d6e9e35c7cce77b122bca1e1.tar.gz rails-ad55b1aa86a1d8b7d6e9e35c7cce77b122bca1e1.tar.bz2 rails-ad55b1aa86a1d8b7d6e9e35c7cce77b122bca1e1.zip |
usages of active resouce
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/source/active_resource_basics.textile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/guides/source/active_resource_basics.textile b/railties/guides/source/active_resource_basics.textile index f0cd25bfc2..64f0949475 100644 --- a/railties/guides/source/active_resource_basics.textile +++ b/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
\ No newline at end of file |