From 6c0609fafb387f2f61ba9eb9754c31bdebeb46ec Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Fri, 6 Oct 2006 17:25:10 +0000 Subject: Add Base.delete for deleting resources without having to instantiate them first git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activeresource/lib/active_resource/base.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activeresource/lib') diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 656698fb25..40fd965487 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -81,6 +81,10 @@ module ActiveResource end end + def delete(id) + connection.delete(element_path(id)) + end + private # { :people => { :person => [ person1, person2 ] } } def find_every(options) -- cgit v1.2.3