All verbs should use formatted urls [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2006-09-13 04:14:18 +00:00
parent 73a8d7393f
commit 6b70c799f8
1 changed files with 3 additions and 3 deletions

View File

@ -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