Skip to content

Instantly share code, notes, and snippets.

View workmanw's full-sized avatar

Wesley Workman workmanw

View GitHub Profile
@workmanw
workmanw / controllers.application.js
Last active October 23, 2017 23:39
ember-data#4918 / UnloadRecord State
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
store: Ember.inject.service('store'),
errorMsgs: null,
init() {
this._super(...arguments);
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
const categories = {
PEOPLE: 'People',
NATURE: 'Nature',
FOODS: 'Foods',
@workmanw
workmanw / controllers.todo-list.js
Last active June 21, 2017 18:41
model.unload() => FilteredRecordArray null values (working)
import Ember from 'ember';
const {
computed,
get,
} = Ember;
export default Ember.Controller.extend({
store: Ember.inject.service(),
@workmanw
workmanw / controllers.todo-list.js
Last active June 21, 2017 18:39
model.unload() => FilteredRecordArray null values (broken)
import Ember from 'ember';
const {
computed,
get,
} = Ember;
export default Ember.Controller.extend({
store: Ember.inject.service(),
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
retry() {
this.get('retryTransition').retry();
}
}
@workmanw
workmanw / components.x-year-month.js
Last active April 26, 2017 23:41
Split Date w/ Two-Way Computed
import Ember from 'ember';
import moment from 'moment';
export default Ember.Component.extend({
value: Ember.computed('month', 'year', {
get() {
let month = this.get('month') - 1;
let year = this.get('year');
return moment().year(year).month(month);
@workmanw
workmanw / components.x-button.js
Last active March 29, 2017 00:25
Theme Service
import Ember from 'ember';
import ThemeMixin from 'app/mixins/theme';
export default Ember.Component.extend(ThemeMixin, {
tagName: 'button',
label: '',
themeType: 'button'
});
@workmanw
workmanw / controllers.application.js
Created March 1, 2017 22:57
Model-Fragment - Fork Addon - 2
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@workmanw
workmanw / controllers.application.js
Last active March 1, 2017 22:54
Model-Fragment - Fork Addon - 1
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@workmanw
workmanw / controllers.application.js
Last active March 2, 2017 00:42
Model-Fragments - Bad Import
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});