lib/client/posting_client.rb in threetaps-client-1.0.7 vs lib/client/posting_client.rb in threetaps-client-1.0.8

- old
+ new

@@ -31,11 +31,11 @@ # client.update_posting(posting2) #=> Array with single CreateResponse object # def create_posting(postings) postings = [postings] unless postings.is_a? Array data = "[" - data << postings.collect{|posting| posting.to_json}.join(',') + data << postings.collect{|posting| posting.to_json.gsub("%22","")}.join(',') data << "]" params = "posts=#{data}" response = execute_post("/posting/create", params) CreateResponse.from_array(decode(response)) end @@ -50,10 +50,10 @@ # client.update_posting(posting) #=> Array with single UpdateResponse object # def update_posting(postings) postings = [postings] unless postings.is_a? Array data = "[" - data << postings.collect{|posting| posting.to_json_for_update}.join(',') + data << postings.collect{|posting| posting.to_json_for_update.gsub("%22","")}.join(',') data << "]" params = "data=#{data}" response = execute_post("posting/update", params) UpdateResponse.from_hash(decode(response)) end