aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorVishnu Atrai <vishnu.atrai@gmail.com>2011-07-30 18:24:18 +0530
committerXavier Noria <fxn@hashref.com>2011-08-13 16:22:11 -0700
commitad55b1aa86a1d8b7d6e9e35c7cce77b122bca1e1 (patch)
treedc888808f780c0cb1e706986a6ba9cd3d4d90f59 /railties/guides
parent95c2230f0577c8f3ef2312fe9268dc9c0ed3bf8a (diff)
downloadrails-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.textile9
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