Skip to content

Instantly share code, notes, and snippets.

@stevenchanin
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenchanin/5ff78d8ab598a27cd73b to your computer and use it in GitHub Desktop.
Save stevenchanin/5ff78d8ab598a27cd73b to your computer and use it in GitHub Desktop.
#javascripts/models/cleints.js.coffee
App.Client = DS.Model.extend
name: DS.attr('string')
active: DS.attr('boolean')
owner: DS.belongsTo('user')
contracts: DS.hasMany('contract')
#javascripts/models/contracts.js.coffee
App.Contract = DS.Model.extend
name: DS.attr('string')
ends_on: DS.attr('date')
client: DS.belongsTo('client')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment