This file contains 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
Model.extend({ | |
firstName: attr('string'), | |
lastName: attr('string'), | |
displayName: computed('firstName', 'lastName', function() { | |
return this.get('firstName') + ' ' + this.get('lastName'); | |
}) | |
// etc... | |
}); |
This file contains 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
import Component from 'ember-component'; | |
import computed from 'ember-computed'; | |
import { displayName } from 'user/utils'; | |
export default Component.extend({ | |
displayName: computed(function() { | |
return displayName(this.get('user')); | |
}), | |
liveDisplayName: computed('firstName', 'lastName', function() { | |
return displayName(this.get('user')); |
This file contains 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
import Service from 'ember-service'; | |
import on from 'ember-evented/on'; | |
import { bind } from 'ember-runloop'; | |
import { subscribe } from 'ember-instrumentation'; | |
const { newrelic } = window; | |
export default Service.extend({ | |
_instrumentComponents: on('init', { | |
subscribe('render.component', { | |
before: bind(this, '_beforeRenderComponent'), |
This file contains 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
import Router from 'ember-router'; | |
import on from 'ember-evented/on'; | |
import { scheduleOnce } from 'ember-runloop'; | |
const { newrelic } = window; | |
const { timing } = window.performance; | |
export default Router.extend({ | |
location: config.locationType, | |
_start: on('didTransition', function() { |
This file contains 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
// jscs:disable maximumLineLength | |
import { test, moduleFor } from 'ember-qunit'; | |
import Model from 'ember-data/model'; | |
import run from 'ember-runloop'; | |
import DS from 'ember-data'; | |
import ApplicationSerializer from 'capsule/pods/application/serializer'; | |
import { hasMany, belongsTo } from 'ember-data/relationships'; | |
const { EmbeddedRecordsMixin } = DS; |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
value: 1, | |
actions: { | |
changeValue() { | |
this.incrementProperty('value') | |
} | |
} | |
}); |
This file contains 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
import { test, moduleForModel } from 'ember-qunit'; | |
import Model from 'ember-data/model'; | |
import BaseModel from 'capsule/pods/base/model'; | |
import attr from 'ember-data/attr'; | |
import run from 'ember-runloop'; | |
import DS from 'ember-data'; | |
import Pretender from 'pretender'; | |
import RESTSerializer from 'ember-data/serializers/rest'; | |
import { hasMany, belongsTo } from 'ember-data/relationships'; |