Sha256: 905c34d4f61e1d98c9fbf3b5755abad85c032d6cf8c1a9a9e44c3f93bee23ecd
Contents?: true
Size: 526 Bytes
Versions: 2
Compression:
Stored size: 526 Bytes
Contents
Backbone = require('backbone') config = require('../../shared/config.json') module.exports = class Card extends Backbone.Model idAttribute: 'title' isNew: ()-> @_isNew url: ()-> if @isNew() console.log @ console.log 'url is new' url = '/api/cards.json' else console.log 'url is not new' url = '/api/cards/' + @get('title') + '.json' if config.api_path url = config.api_path + url url parse: (response)-> if response.card then response.card else response
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
carte-server-0.0.9 | lib/carte/client/models/card.coffee |
carte-server-0.0.8 | lib/carte/client/models/card.coffee |