aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source
diff options
context:
space:
mode:
authorVishnu Atrai <vishnu.atrai@gmail.com>2011-08-01 21:02:48 +0530
committerXavier Noria <fxn@hashref.com>2011-08-04 16:41:29 -0700
commitf3564b9e22ae318dadee6c21c52aba01f91b27bb (patch)
tree8e97dcd018f16c4127626dce3991db8e8a09782b /railties/guides/source
parenteed1026e83e04aef4c455a15636dab2e0e28efe3 (diff)
downloadrails-f3564b9e22ae318dadee6c21c52aba01f91b27bb.tar.gz
rails-f3564b9e22ae318dadee6c21c52aba01f91b27bb.tar.bz2
rails-f3564b9e22ae318dadee6c21c52aba01f91b27bb.zip
Active Resource - guide for destroy
Diffstat (limited to 'railties/guides/source')
-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 1115b9848f..332d113fa7 100644
--- a/railties/guides/source/active_resource_basics.textile
+++ b/railties/guides/source/active_resource_basics.textile
@@ -60,6 +60,15 @@ person.name = 'Atrai'
person.save
</ruby>
+h4. Delete
+
+'destroy' method makes a HTTP DELETE request for an existing resource in JSON format to delete that resource.
+
+<ruby>
+person = Person.find(1)
+person.destroy
+</ruby>
+
h3. Changelog
* July 30, 2011: Initial version by "Vishnu Atrai":http://github.com/vatrai \ No newline at end of file