method
included
included(within)
public
Hide source
# File activeresource/lib/active_resource/custom_methods.rb, line 34 def self.included(within) within.class_eval do extend ActiveResource::CustomMethods::ClassMethods include ActiveResource::CustomMethods::InstanceMethods class << self alias :orig_delete :delete def get(method_name, options = {}) connection.get(custom_method_collection_url(method_name, options), headers) end def post(method_name, options = {}, body = '') connection.post(custom_method_collection_url(method_name, options), body, headers) end def put(method_name, options = {}, body = '') 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), headers) else orig_delete(custom_method_name, options) end end end end end


