Created
August 16, 2012 14:18
-
-
Save sishen/3370424 to your computer and use it in GitHub Desktop.
Sample Spine.js Model in Pragmatic.ly
This file contains hidden or 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 App.Project extends Spine.Model | |
@configure 'Project', 'id', 'name', 'description', 'owner_id', 'uid' | |
@extend Spine.Model.Ajax | |
@extend Spine.Model.Dirty | |
validate: -> | |
'name required' unless @name | |
inviteUser: (email) -> | |
App.Invitation.create(project_id: @id, email: email) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment