Sha256: 748a437b1b7b1f460d0c6ad35e38a93c48a9f385791a9999872fdb855bd48f90
Contents?: true
Size: 540 Bytes
Versions: 11
Compression:
Stored size: 540 Bytes
Contents
Backbone = require('backbone') config = require('../config') querystring = require('querystring') module.exports = class Card extends Backbone.Model idAttribute: 'title' isNew: ()-> @_isNew url: ()-> if @isNew() console.log @ console.log 'url is new' url = '/cards.json' else console.log 'url is not new' url = '/cards/' + encodeURIComponent(@get('title')) + '.json' config.root_path + config.api_path + url parse: (response)-> if response.card then response.card else response
Version data entries
11 entries across 11 versions & 1 rubygems