lib/afmotion/http.rb in afmotion-2.5 vs lib/afmotion/http.rb in afmotion-2.6

- old
+ new

@@ -42,13 +42,14 @@ [HTTP, JSON, XML, PLIST, Image].each do |base| AFMotion::HTTP_METHODS.each do |method_name| method_signature = "#{method_name.to_s.upcase}:parameters:success:failure:" base.define_singleton_method(method_name, -> (url, parameters = nil, &callback) do - base.operation_manager.send(method_signature, url, + manager = base.operation_manager + manager.send(method_signature, url, parameters, AFMotion::Operation.success_block_for_http_method(method_name, callback), AFMotion::Operation.failure_block(callback)) end) end end -end \ No newline at end of file +end