我现在有一个用Rubymotion创建的iOS应用程序。我正在使用Bubblewrap来执行REST命令。我有下面的代码,它正在创建记录,但没有编写任何数据。
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我也得到了“成功”的回应。是什么阻止它将数据投递到我的应用程序,但创建帐户?
发布于 2013-08-30 18:27:15
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。
https://stackoverflow.com/questions/18467969
复制相似问题