This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var attr = DS.attr; | |
| var hasMany = DS.hasMany; | |
| var belongsTo = DS.belongsTo; | |
| var Category = DS.Model.extend({ | |
| title: attr(), | |
| displayHint: attr(), | |
| categoryList: hasMany('category', {inverse: 'parent'}), | |
| parent: belongsTo('category', {inverse: 'categoryList'}) | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "installed_packages": | |
| [ | |
| "Better JavaScript", | |
| "Dust.js", | |
| "EditorConfig", | |
| "Ember.js Snippets", | |
| "Emmet", | |
| "GitGutter", | |
| "Handlebars", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "predef": [ | |
| "document", | |
| "window", | |
| "location", | |
| "setTimeout", | |
| "Ember", | |
| "Em", | |
| "DS", | |
| "$", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| App.Router.map(function() { | |
| this.resource('channels', {path: '/'}, function() { | |
| this.resource('events', {path: '/:channel_id/events'}); | |
| }); | |
| }); | |
| App.ChannelsRoute = Em.Route.extend({ | |
| model: function() { | |
| return this.store.find('channels'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find: function(store, type, id/*, opts*/) { | |
| return new Ember.RSVP.Promise(function(resolve, reject) { | |
| hoodie.store.find(type.typeKey, id).then(function(data) { | |
| Ember.run(null, resolve, data); | |
| }, function(data) { | |
| Ember.run(null, reject, data); | |
| }); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Put your CSS here */ | |
| html, body { | |
| margin: 20px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Put your CSS here */ | |
| html, body { | |
| margin: 20px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Put your CSS here */ | |
| html, body { | |
| margin: 20px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Our model does some calls to a server or whatever | |
| var model = new Ember.RSVP.Promise(function(resolve, reject){ | |
| if(someCondition){ | |
| resolve(someData); | |
| } else { | |
| reject(err); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [diff] | |
| tool = smartsynchronize | |
| [difftool "smartsynchronize"] | |
| cmd = /Applications/SmartSynchronize.app/Contents/MacOS/SmartSynchronize "$LOCAL" "$REMOTE" | |
| [difftool] | |
| prompt = false |