In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
| //record (internal-model) | |
| save: function(options) { | |
| var promiseLabel = "DS: Model#save " + this; | |
| var resolver = Ember.RSVP.defer(promiseLabel); //http://emberjs.com/api/classes/RSVP.html#method_defer | |
| this.store.scheduleSave(this, resolver, options); | |
| return resolver.promise; | |
| }, | |
| //store.js |
| #!/usr/bin/python | |
| # vim:set fileencoding=utf-8 sw=2 ai: | |
| import sqlite3 | |
| import datetime | |
| import re | |
| SQL = ''' | |
| select | |
| name, version, time, author, text |