Created
June 28, 2012 10:59
-
-
Save hulufei/3010672 to your computer and use it in GitHub Desktop.
Spine Ajax update model handle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User extends Spine.Model | |
@configure 'User', 'name' | |
@extend Spine.Model.Ajax | |
@url: '/save' | |
user = new User(name: 'test') | |
# 设定/save直接返回 {flag: 0} | |
user.save() | |
User.bind 'update', (item) -> | |
# Ajax请求完成之后update,item里面没有flag属性 | |
console.log(item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment