1

I currently have an iOS app i'm creating with Rubymotion. I am using Bubblewrap to do my REST commands. I have the below code, and it is creating the record, but not writing any of the data.

first = @kidfirst.text
last = @kidlast.text
data = {first_name: '#{first}', last_name: '#{last}'}
BW::HTTP.post("url", {payload: data}) do |response|
  if response.ok?
    p "Success"
  else
    p "response.error_message"
  end
end

I am getting the "Success" response also. What would stop it from posting the data to my application but create the account?

4

1 回答 1

0
first = @kidfirst.text
last = @kidlast.text
data = {:child => {first_name: '#{first}', last_name: '#{last}'}}
BW::HTTP.post("url", {payload: data}) do |response|
  if response.ok?
    p "Success"
  else
    p "response.error_message"
  end
end

问题是当它发布时它不知道在rails后端发布它的位置,因为我正在调用params [:child]。

于 2013-08-30T18:27:15.783 回答