aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-09-13 04:14:18 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-09-13 04:14:18 +0000
commit6b70c799f829f93fd8d0355af0e6488d2c1102ab (patch)
treee3a8bfac6964cbb10714158d3d9bf9d3c076ae29 /activeresource/lib/active_resource
parent73a8d7393f842d4030561cef20fcf0ec9d52e1b9 (diff)
downloadrails-6b70c799f829f93fd8d0355af0e6488d2c1102ab.tar.gz
rails-6b70c799f829f93fd8d0355af0e6488d2c1102ab.tar.bz2
rails-6b70c799f829f93fd8d0355af0e6488d2c1102ab.zip
All verbs should use formatted urls [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/lib/active_resource')
-rw-r--r--activeresource/lib/active_resource/base.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 56c6dc172b..89724b1814 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -119,7 +119,7 @@ module ActiveResource
end
def destroy
- connection.delete(self.class.element_path(id, prefix_options)[0..-5])
+ connection.delete(self.class.element_path(id, prefix_options))
end
def to_xml
@@ -159,11 +159,11 @@ module ActiveResource
end
def update
- connection.put(self.class.element_path(id, prefix_options)[0..-5], to_xml)
+ connection.put(self.class.element_path(id, prefix_options), to_xml)
end
def create
- returning connection.post(self.class.collection_path(prefix_options)[0..-5], to_xml) do |resp|
+ returning connection.post(self.class.collection_path(prefix_options), to_xml) do |resp|
self.id = resp['Location'][/\/([^\/]*?)(\.\w+)?$/, 1]
end
end