[英]Handling server-side sync with Codeigniter for Backbone.js
How should a Backbone sync aka RESTful JSON request
be handled on the PHP Codeigniter side?应该如何在 PHP Codeigniter 端处理 Backbone sync aka
RESTful JSON request
?
There's a Ruby example in the manual but I don't know Ruby maybe someone could translate it?手册中有一个 Ruby 示例,但我不知道 Ruby 也许有人可以翻译它?
def update
account = Account.find params[:id]
account.update_attributes params
render :json => account
end
http://documentcloud.github.com/backbone/#Sync http://documentcloud.github.com/backbone/#Sync
I have not used it, personally, but you might want to check out Phil Sturgeon's RESTful server for CodeIgniter .我个人没有使用过它,但您可能想查看 Phil Sturgeon 的RESTful 服务器 CodeIgniter 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.