aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/custom_methods.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-04-29 04:46:14 +0000
committerRick Olson <technoweenie@gmail.com>2007-04-29 04:46:14 +0000
commit8e8fd99d7f88f35f67d46d43eea693a67e61d7ec (patch)
tree69cb7bb59ad00546277ee1d3ef4e18c5459b7d11 /activeresource/lib/active_resource/custom_methods.rb
parentbd50d82f701c55d89b891ebd216ec84008b486c1 (diff)
downloadrails-8e8fd99d7f88f35f67d46d43eea693a67e61d7ec.tar.gz
rails-8e8fd99d7f88f35f67d46d43eea693a67e61d7ec.tar.bz2
rails-8e8fd99d7f88f35f67d46d43eea693a67e61d7ec.zip
change #custom_headers to just #headers [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/lib/active_resource/custom_methods.rb')
-rw-r--r--activeresource/lib/active_resource/custom_methods.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/activeresource/lib/active_resource/custom_methods.rb b/activeresource/lib/active_resource/custom_methods.rb
index f4e21714a3..ce32dc111d 100644
--- a/activeresource/lib/active_resource/custom_methods.rb
+++ b/activeresource/lib/active_resource/custom_methods.rb
@@ -36,21 +36,21 @@ module ActiveResource
alias :orig_delete :delete
def get(method_name, options = {})
- connection.get(custom_method_collection_url(method_name, options), custom_headers)
+ connection.get(custom_method_collection_url(method_name, options), headers)
end
def post(method_name, options = {}, body = nil)
- connection.post(custom_method_collection_url(method_name, options), body, custom_headers)
+ connection.post(custom_method_collection_url(method_name, options), body, headers)
end
def put(method_name, options = {}, body = nil)
- connection.put(custom_method_collection_url(method_name, options), body, custom_headers)
+ connection.put(custom_method_collection_url(method_name, options), body, headers)
end
# Need to jump through some hoops to retain the original class 'delete' method
def delete(custom_method_name, options = {})
if (custom_method_name.is_a?(Symbol))
- connection.delete(custom_method_collection_url(custom_method_name, options), custom_headers)
+ connection.delete(custom_method_collection_url(custom_method_name, options), headers)
else
orig_delete(custom_method_name, options)
end
@@ -71,23 +71,23 @@ module ActiveResource
module InstanceMethods
def get(method_name, options = {})
- connection.get(custom_method_element_url(method_name, options), self.class.custom_headers)
+ connection.get(custom_method_element_url(method_name, options), self.class.headers)
end
def post(method_name, options = {}, body = nil)
if new?
- connection.post(custom_method_new_element_url(method_name, options), (body.nil? ? to_xml : body), self.class.custom_headers)
+ connection.post(custom_method_new_element_url(method_name, options), (body.nil? ? to_xml : body), self.class.headers)
else
- connection.post(custom_method_element_url(method_name, options), body, self.class.custom_headers)
+ connection.post(custom_method_element_url(method_name, options), body, self.class.headers)
end
end
def put(method_name, options = {}, body = nil)
- connection.put(custom_method_element_url(method_name, options), body, self.class.custom_headers)
+ connection.put(custom_method_element_url(method_name, options), body, self.class.headers)
end
def delete(method_name, options = {})
- connection.delete(custom_method_element_url(method_name, options), self.class.custom_headers)
+ connection.delete(custom_method_element_url(method_name, options), self.class.headers)
end