Module: ActiveResource::CustomMethods

Defined in:
lib/active_resource/custom_methods_ext.rb

Instance Method Summary collapse

Instance Method Details

#delete(method_name, options = {}, body = nil) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/active_resource/custom_methods_ext.rb', line 3

def delete(method_name, options = {}, body = nil)
  if body.blank?
    connection.delete(custom_method_element_url(method_name, options), self.class.headers)
  else
    connection.delete_with_body(custom_method_element_url(method_name, options), body, self.class.headers)
  end
end