简体   繁体   中英

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?

There's a Ruby example in the manual but I don't know Ruby maybe someone could translate it?

def update
  account = Account.find params[:id]
  account.update_attributes params
  render :json => account
end

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM