Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

All verbs should use formatted urls [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 6b70c799f829f93fd8d0355af0e6488d2c1102ab 1 parent 73a8d73
@dhh dhh authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 activeresource/lib/active_resource/base.rb
View
6 activeresource/lib/active_resource/base.rb
@@ -119,7 +119,7 @@ def save
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 @@ def connection(refresh = false)
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
Please sign in to comment.
Something went wrong with that request. Please try again.