Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample Spine.js Model in Pragmatic.ly
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
You can’t perform that action at this time.